aboutsummaryrefslogtreecommitdiffstats
path: root/spring-front
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2022-03-23 07:24:43 +0000
committerterminaldweller <thabogre@gmail.com>2022-03-23 07:24:43 +0000
commit7befb0d210a820c29a22f3c80c89620fe20c4c17 (patch)
tree3084b94a0dd1256164bef4881648f1b0fdbf8cbe /spring-front
parentwip (diff)
downloadmdrtl-7befb0d210a820c29a22f3c80c89620fe20c4c17.tar.gz
mdrtl-7befb0d210a820c29a22f3c80c89620fe20c4c17.zip
wip
Diffstat (limited to 'spring-front')
-rw-r--r--spring-front/Dockerfile1
-rw-r--r--spring-front/nginx.conf7
-rw-r--r--spring-front/public/index.html3
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>