Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,38 @@ server {
proxy_ssl_verify off;
}

location ~ ^/[^/]+/(tmp|ilx)_.*\.(html|ttl|jsonld|n3|owl|csv)$ {
proxy_pass https://uri.olympiangods.org$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

# CORS headers
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
}

location ~ ^/[^/]+/ontologies/uris/.*/spec$ {
proxy_pass https://uri.olympiangods.org$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

# Forward Authorization header if present
proxy_set_header Authorization $http_authorization;

# CORS headers
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Expose-Headers X-Redirect-Location always;

# Handle 303 redirects: move Location to X-Redirect-Location
proxy_intercept_errors on;
error_page 303 = @handle_303;
}

location /static/ {
autoindex on;
alias /usr/share/nginx/html/static/;
Expand Down