remove the environment configs as they never work
This commit is contained in:
@@ -7,15 +7,6 @@ services:
|
||||
volumes:
|
||||
- ./nginx/html:/usr/share/nginx/html:ro
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||
environment:
|
||||
- MEDIA_API_KEY=key-mindboost-media-server # ⇦ beliebig ändern
|
||||
- SERVER_NAME=b.mindboost.team # ⇦ beliebig ändern
|
||||
command: >
|
||||
/bin/sh -c '
|
||||
envsubst < /etc/nginx/conf.d/default.conf.template \
|
||||
> /etc/nginx/conf.d/default.conf \
|
||||
&& nginx -t \
|
||||
&& exec nginx -g "daemon off;"'
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name ${SERVER_NAME};
|
||||
server_name b.mindboost.team;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
@@ -8,7 +8,7 @@ server {
|
||||
# ———————————————— Audio + CORS + Key-Check ————————————————
|
||||
location ~* \.(opus|flac|ogg|mp3|wav|m4a|aac)$ {
|
||||
|
||||
if ($request_method = 'OPTIONS') {
|
||||
if ($request_method = OPTIONS) {
|
||||
add_header Access-Control-Allow-Origin "*" always;
|
||||
add_header Access-Control-Allow-Methods "GET, HEAD, OPTIONS" always;
|
||||
add_header Access-Control-Allow-Headers "X-API-Key, Content-Type, Keep-Alive, User-Agent, Cache-Control" always;
|
||||
@@ -18,7 +18,7 @@ server {
|
||||
}
|
||||
|
||||
|
||||
if ($http_x_api_key != "${MEDIA_API_KEY}") {
|
||||
if ($http_x_api_key != 'key-mindboost-media-server') {
|
||||
# (optional) WWW-Authenticate-Header für Clients
|
||||
add_header WWW-Authenticate 'API key required' always;
|
||||
return 401;
|
||||
|
Reference in New Issue
Block a user