Skip to content

Commit

Permalink
feat: let nginx serve uploaded files in a deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
lalver1 committed Nov 15, 2024
1 parent 4427574 commit 6f3ff9e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions appcontainer/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ http {
add_header Cache-Control public;
}

# path for uploaded files
location /uploads/ {
alias /home/calitp/app/data/uploads/;
expires 1y;
add_header Cache-Control public;
}

location / {
# checks for static file, if not found proxy to app
try_files $uri @proxy_to_app;
Expand Down

0 comments on commit 6f3ff9e

Please sign in to comment.