try to make it work 1
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
# --------------------------- ENV-Key übernehmen ---------------------------
|
||||
# envsubst ersetzt ${MEDIA_API_KEY} durch den Wert aus docker-compose.yml
|
||||
|
||||
# --------- Preflight-Erkennung per map ---------
|
||||
map $request_method $cors_preflight {
|
||||
"OPTIONS" 1;
|
||||
default 0;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
@@ -14,8 +9,8 @@ server {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# ---------- Preflight (OPTIONS) ----------
|
||||
if ($cors_preflight = 1) {
|
||||
# --------- Preflight direkt per IF ---------
|
||||
if ($request_method = OPTIONS) {
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
add_header Access-Control-Allow-Methods "GET, HEAD, OPTIONS";
|
||||
add_header Access-Control-Allow-Headers "Content-Type, X-API-Key";
|
||||
|
Reference in New Issue
Block a user