Skip to content

Commit

Permalink
I'm hoping this fixes the broken images/styles etc..
Browse files Browse the repository at this point in the history
  • Loading branch information
kenlight-bu committed Sep 15, 2024
1 parent c29f942 commit 0d082bd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions code/nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@
events {}

http {
include mime.types;
default_type application/octet-stream;

server {
listen ${PORT};

location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri /index.html;
}

# Additional configuration to ensure correct MIME types for static assets
location ~* \.(css|js|woff2?|ttf|eot|svg|png|jpg|jpeg|gif)$ {
root /usr/share/nginx/html;
expires 1d;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
}
}

0 comments on commit 0d082bd

Please sign in to comment.