From d2252d4507d89c58c92a36a61f42750090333a72 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Fri, 4 Aug 2023 14:16:28 +0200 Subject: [PATCH] Enable cors for everything. --- docker/server.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/server.conf b/docker/server.conf index d49a581..d4e04ea 100644 --- a/docker/server.conf +++ b/docker/server.conf @@ -27,6 +27,12 @@ server { http2_push /chart.js; http2_push /main.js; etag on; + + # Enable CORS for all files + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type'; + add_header 'Access-Control-Allow-Credentials' 'true' always; } error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 414 415 416 417 418 421 422 423 424 425 426 428 429 431 451 500 501 502 503 504 505 506 507 508 510 511 /404;