diff options
-rw-r--r-- | spring-front/Dockerfile | 1 | ||||
-rw-r--r-- | spring-front/nginx.conf | 7 | ||||
-rw-r--r-- | spring-front/public/index.html | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/spring-front/Dockerfile b/spring-front/Dockerfile index 9bb7ca7..18b6b57 100644 --- a/spring-front/Dockerfile +++ b/spring-front/Dockerfile @@ -10,7 +10,6 @@ COPY package.json ./ COPY package-lock.json ./ RUN npm ci RUN npm install react-scripts -g -# COPY . ./ COPY ./public/ ./public/ COPY ./src/ ./src/ RUN npm run build diff --git a/spring-front/nginx.conf b/spring-front/nginx.conf index bd12e62..9d6d5c1 100644 --- a/spring-front/nginx.conf +++ b/spring-front/nginx.conf @@ -3,9 +3,11 @@ events { } http { include /etc/nginx/mime.types; + server_tokens off; + limit_req_zone $binary_remote_addr zone=one:10m rate=30r/m; server { listen 443 ssl http2; - keepalive_timeout 70; + keepalive_timeout 60; charset utf-8; ssl_certificate /certs/server.cert; ssl_certificate_key /certs/server.key; @@ -19,10 +21,11 @@ http { add_header X-Frame-Options SAMEORIGIN always; add_header X-XSS-Protection "1; mode=block" always; fastcgi_hide_header X-Powered-By; + error_page 401 403 404 /404.html; location / { root /usr/share/nginx/html; index index.html; - try_files $uri $uri/ /index.html; + try_files $uri $uri/ =404; } } } diff --git a/spring-front/public/index.html b/spring-front/public/index.html index 1432ddb..804f336 100644 --- a/spring-front/public/index.html +++ b/spring-front/public/index.html @@ -10,6 +10,7 @@ src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js" ></script> <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script> + <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> <link rel="stylesheet" href="index.css" @@ -26,8 +27,8 @@ <title>RTLMD</title> </head> <body> + <noscript>You need to enable JavaScript to run this app.</noscript> <div id="root"></div> <div id="root2"></div> - <script src="../src/index.js"></script> </body> </html> |