diff --git a/Dockerfile b/Dockerfile index e8694d57ce..4bf41000df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,15 +13,19 @@ COPY . . RUN pnpm install RUN pnpm run build -# Create a dedicated default directory for workspaces +# Create a default directory for workspaces RUN mkdir -p /app/workspaces -# Configure Nginx to trick dsh web into thinking all requests originate from local loopback +# Configure Nginx to spoof Host, Origin, and Referer headers RUN echo 'server { \ listen 3080; \ location / { \ proxy_pass http://127.0.0.1:3081; \ proxy_set_header Host 127.0.0.1:3081; \ + proxy_set_header Origin http://127.0.0.1:3081; \ + proxy_set_header Referer http://127.0.0.1:3081/; \ + proxy_set_header X-Real-IP 127.0.0.1; \ + proxy_set_header X-Forwarded-For 127.0.0.1; \ proxy_http_version 1.1; \ proxy_set_header Upgrade $http_upgrade; \ proxy_set_header Connection "upgrade"; \