1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-27 10:07:44 +00:00

nginx: fix CORS

This commit is contained in:
RGBCube 2025-06-09 02:02:36 +03:00
parent 65301620ce
commit f14c7ccbb3
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M

View file

@ -64,11 +64,11 @@ in {
} }
map $http_origin $allow_origin { map $http_origin $allow_origin {
~^https://.+\.${domain}$ $http_origin; ~^https://(?:.+\.)?${domain}$ $http_origin;
} }
map $http_origin $allow_methods { map $http_origin $allow_methods {
~^https://.+\.${domain}$ "CONNECT, DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT, TRACE"; ~^https://(?:.+\.)?${domain}$ "CONNECT, DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT, TRACE";
} }
${config.services.nginx.headers} ${config.services.nginx.headers}