ControlledVocabularyManager
ControlledVocabularyManager copied to clipboard
eliminate nginx configuration for HTTP_ACCEPT
At the lowest level (Rack?) have the application check public/ns/**/* and the HTTP_ACCEPT for the request to serve a static page rather than have Nginx evaluate the traffic. This update aims at solving the problem where nginx try_files isn't capable of content negotiation.
Issue is referring to nginx configuration:
#try_files $uri/index.html $uri.html $uri @app;
# temporary hack to get CVM working with OD
set $extension "nt";
if ($http_accept ~ "html"){
set $extension "html";
}
if ($http_accept ~ "ld+json") {
set $extension "jsonld";
}
if ($http_accept ~ "n-triples") {
set $extension "nt";
}
try_files $uri/index.$extension $uri.$extension $uri @app;