citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

commit 06489c519a5d4ddac03abf5bd8c471b6d3d371fa
parent 79799d73fd4111781d236326b52db4351767683d
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 28 Jan 2024 14:42:34 -0800

Merge remote-tracking branch 'purple/purple'

Diffstat:
Mnix-config/machines/purple/nginx/default.nix | 23+++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/nix-config/machines/purple/nginx/default.nix b/nix-config/machines/purple/nginx/default.nix @@ -24,6 +24,7 @@ let logDir = "/var/log/nginx"; LN_NODE_ADDRESS=extra.private.ln_node_address; LN_RUNE=extra.private.ln_rune; LN_WS_PROXY=extra.private.ln_ws_proxy; + TEST_PRODUCTS=if env != "production" then "true" else "false"; DB_PATH=db; }; }; @@ -91,18 +92,37 @@ in { proxy_pass http://localhost:${toString damus-api-port}; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; + + add_header 'Access-Control-Allow-Origin' 'https://damus.io' always; + add_header 'Access-Control-Expose-Headers' 'Content-Length' always; } } server { listen 80; - server_name api.staging.damus.io; + server_name api-staging.damus.io; location / { proxy_pass http://localhost:${toString damus-api-staging-port}; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; + + add_header 'Access-Control-Allow-Origin' 'https://staging.damus.io' always; + add_header 'Access-Control-Expose-Headers' 'Content-Length' always; + } + } + + server { + listen 80; + + server_name staging.damus.io; + + location / { + root /www/staging.damus.io; + + add_header 'Access-Control-Allow-Origin' '*' always; + add_header 'Access-Control-Expose-Headers' 'Content-Length' always; } } @@ -112,7 +132,6 @@ in { server_name damus.io; location / { - autoindex on; root /www/damus.io; add_header 'Access-Control-Allow-Origin' '*' always;