CORS 4
All checks were successful
Deploy App / deploy (push) Successful in 15s

This commit is contained in:
valere
2025-12-17 21:07:02 +01:00
parent 61924d5239
commit a8190793c4
2 changed files with 12 additions and 1 deletions

View File

@@ -4,4 +4,4 @@ WORKDIR /app
COPY . . COPY . .
RUN npm ci RUN npm ci
CMD npx serve --cors /mnt/media/files CMD ["npx", "serve", "/mnt/media/files", "-c", "/app/serve.json"]

11
serve.json Normal file
View File

@@ -0,0 +1,11 @@
{
"cors": {
"origin": ["https://evilspins.com", "http://localhost:3000"],
"methods": ["GET", "HEAD", "PUT", "PATCH", "POST", "DELETE"],
"allowedHeaders": ["Content-Type", "Authorization"],
"exposedHeaders": ["Content-Range", "X-Content-Range"],
"credentials": true
},
"etag": true,
"cacheControl": true
}