Skip to content

Commit

Permalink
add headers for /download
Browse files Browse the repository at this point in the history
  • Loading branch information
creatorcary committed Feb 6, 2025
1 parent d7e3ef9 commit d554fb4
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ http {
'' close;
}

map $http_origin $allow_origin {
~ixsystems.net$ $http_origin;
default "";
}

server {
server_name localhost;
% if ssl_configuration:
Expand Down Expand Up @@ -317,6 +322,10 @@ http {
}

location /_download {
# Allow all internal origins.
add_header Access-Control-Allow-Origin $allow_origin always;
add_header Access-Control-Allow-Headers "*" always;

proxy_pass http://127.0.0.1:6000;
proxy_http_version 1.1;
proxy_set_header X-Real-Remote-Addr $remote_addr;
Expand Down

0 comments on commit d554fb4

Please sign in to comment.