Just lost several hours of my life to silly CORS issues while setting up https://static-s.umeyashiki.org as my Akkoma media base URL   

Nginx “gotcha”: header inheritance.

If you put an add_header directive inside a location block, it completely suppresses all add_header directives defined in the parent server block.

server { add_header "X-Hdr-A" "Value"; add_header "X-Hdr-B" "Value"; location / { add_header "X-Hdr-C" "Value"; # <-- This wipes out A and B! access_log /var/log/a.log; } location /bb { access_log /var/log/b.log; # <-- A and B will show up here just fine. } }

If your global headers are mysteriously disappearing on certain paths, maybe check your location blocks.

#http #nginx #cors #akkoma