Skip to content

Commit

Permalink
feat(nginx): Trust admins to upload large files
Browse files Browse the repository at this point in the history
refs: #1661
  • Loading branch information
markstos committed Jul 5, 2022
1 parent d792b10 commit e57ad74
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions extensions/nginx/templates/nginx-ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,15 @@ server {
}

client_max_body_size 50m;

# Trust admin users to upload large files
location <%= location %>ghost/api/admin/media/upload/ {
client_max_body_size 0;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:<%= port %>;
<% if (location !== '/') { %>proxy_redirect off;<% } %>
}
}

0 comments on commit e57ad74

Please sign in to comment.