From 608b5ba7936a5dd3d0d43067e7bfc20b679c23fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Thu, 27 Nov 2025 16:45:14 +0100 Subject: [PATCH] fix: nginx audio mime types --- ai/nginx.conf.template | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ai/nginx.conf.template b/ai/nginx.conf.template index 7129bed..555e8be 100644 --- a/ai/nginx.conf.template +++ b/ai/nginx.conf.template @@ -3,6 +3,10 @@ events { } http { + # MIME types + include /etc/nginx/mime.types; + default_type application/octet-stream; + # Proxy settings proxy_http_version 1.1; proxy_buffering off; @@ -28,6 +32,21 @@ http { # Increase client body size for image uploads client_max_body_size 100M; + # Audio files - fix Content-Type for browser playback + location ~ \.wav$ { + proxy_pass http://${GPU_SERVICE_HOST}:${GPU_SERVICE_PORT}; + proxy_hide_header Content-Type; + add_header Content-Type "audio/wav"; + proxy_hide_header Content-Disposition; + } + + location ~ \.mp3$ { + proxy_pass http://${GPU_SERVICE_HOST}:${GPU_SERVICE_PORT}; + proxy_hide_header Content-Type; + add_header Content-Type "audio/mpeg"; + proxy_hide_header Content-Disposition; + } + location / { # Proxy to service on RunPod via Tailscale proxy_pass http://${GPU_SERVICE_HOST}:${GPU_SERVICE_PORT};