Skip to content

Commit

Permalink
Merge pull request #16 from AElfProject/fix/single-page-application-r…
Browse files Browse the repository at this point in the history
…outing

fix: single-page application routing
  • Loading branch information
yongenaelf authored Jun 13, 2024
2 parents fb20c69 + df1bc5f commit fb87574
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ FROM cgr.dev/chainguard/nginx:latest
WORKDIR /usr/share/nginx/html
COPY build .

COPY nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 8080
17 changes: 17 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
server {
listen 8080;
root /usr/share/nginx/html;
gzip on;
gzip_types text/css application/javascript application/json image/svg+xml;
gzip_comp_level 9;
etag on;
location / {
try_files $uri $uri/ /index.html;
}
location /assets/ {
add_header Cache-Control max-age=31536000;
}
location /index.html {
add_header Cache-Control no-cache;
}
}

0 comments on commit fb87574

Please sign in to comment.