diff --git a/Dockerfile b/Dockerfile index 1c220fc..03537d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,4 +4,4 @@ WORKDIR /app COPY . . RUN npm ci -CMD npx serve /mnt/media/files +CMD ["npx", "serve", "/mnt/media/files", "-c", "serve.json"] diff --git a/serve.json b/serve.json new file mode 100644 index 0000000..cf63547 --- /dev/null +++ b/serve.json @@ -0,0 +1,21 @@ +{ + "headers": [ + { + "source": "*", + "headers": [ + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Access-Control-Allow-Methods", + "value": "GET, POST, PUT, DELETE, OPTIONS" + }, + { + "key": "Access-Control-Allow-Headers", + "value": "Content-Type, Authorization" + } + ] + } + ] +}