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