Skip to content

Commit

Permalink
add headers for /download (#15621)
Browse files Browse the repository at this point in the history
  • Loading branch information
creatorcary authored Feb 7, 2025
1 parent 5d5bb74 commit 8e7c61c
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 8e7c61c

Please sign in to comment.