From 0e378c2c2441248cf1138beec8cb28c1158c7093 Mon Sep 17 00:00:00 2001 From: Sirttas Date: Sun, 3 Sep 2023 21:46:30 +0200 Subject: [PATCH] nginx --- Dockerfile | 1 + nginx.conf | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 29536af..28d80c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,3 +7,4 @@ RUN npm run build FROM nginx COPY --from=build /app/dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf diff --git a/nginx.conf b/nginx.conf index 80fada7..1e36b6f 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,8 +1,8 @@ server { root /usr/share/nginx/html; + index index.html; - add_header 'Access-Control-Allow-Origin' 'https://api.eveal.shendai.rip,https://evepraisal.shendai.rip' always; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always; - add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always; - add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always; + location / { + try_files $uri $uri/ $uri.html /index.html; + } } \ No newline at end of file