From e3eb6db1f4654e7b4fd1f3ab089832db7b74caa1 Mon Sep 17 00:00:00 2001 From: Robert Rapp Date: Thu, 17 Jul 2025 13:51:43 +0200 Subject: [PATCH] try to understand syntax of ngnix --- nginx/conf.d/default.conf.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx/conf.d/default.conf.template b/nginx/conf.d/default.conf.template index 6bac68b..aea6657 100644 --- a/nginx/conf.d/default.conf.template +++ b/nginx/conf.d/default.conf.template @@ -15,7 +15,7 @@ server { location ~* \.(opus|flac|ogg|mp3|wav|m4a|aac)$ { # --------- Preflight direkt per IF --------- - if ($request_method = "OPTIONS") { + 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,Keep-Alive,User-Agent,Cache-Control,Content-Type"; @@ -25,7 +25,7 @@ server { } # --- Key-Check (nur GET/HEAD) --- - if ($request_method != "OPTIONS") { + if ($request_method != OPTIONS) { if ($http_x_api_key != "${MEDIA_API_KEY}") { return 401; }