Commit graph

14 commits

Author SHA1 Message Date
Bart Schuurmans 75bc4f8cb0 Make nginx config safer
Instead of allowing all image files anywhere, and disallowing non-image file under /images/, only
allow image files under /images/ and don't match non-image files elsewhere. They get proxied to web
instead and result in a 404 there.

For example, the old config allowed /exports/foo.jpg to be served, while the new config does not.
2024-03-29 15:04:38 +01:00
Hugh Rundle ddc35a7a52
fix multiple issues from user exports config changes
- improve nginx config
- fix DATA_UPLOAD_MAX_MEMORY_SIZE default not being an int
- translate fallback value in id_to_username template tag
- make location of setting to turn on user exports easier to locate for admins

fixes #3227
fixes #3231
fixes #3232
fixes #3236
2024-01-20 13:19:13 +11:00
Milan dd5c314bd5 nginx: also serve svg static files 2024-01-18 22:29:43 +01:00
Milan a59dcfc890 nginx: fix missing ttf static files 2024-01-18 17:03:02 +01:00
Hugh Rundle ea7f3c297e
allow js and css 2024-01-17 20:12:06 +11:00
Hugh Rundle d640e4ac96
disable user exports by default
- new setting to enable user exports defaults to False
- add setting to enable and disable user exports
- do not allow user exports when using s3 storage
- do not serve non-image files from /images/ (requires update to nginx settings)
- increase default file upload limit to 100MB to enable user exports to be imported (can be changed in .env)
2024-01-16 21:32:13 +11:00
Trammell Hudson 43b194d612 nginx: route /flower to the queue monitoring system.
This patch removes the exposed port for the flower
server and instead uses nginx to route urls /flower/*
to the queue monitoring system.
2022-12-06 13:01:40 +00:00
Trammell Hudson 5922e29369 Enable nginx caching and optimizations.
This patch enabled nginx caching of responses for non-logged in users
so that a boost by a popular mastodon user doesn't DDOS the bookwyrm site.
It also silences some of the nginx access logs so that static files are
not logged.
2022-12-06 13:01:40 +00:00
Mouse Reeve 40ead41176 Fixes rate limiter 2022-11-01 18:17:37 -07:00
Hugh Rundle e1513bf98d amend nginx rate limiting urls 2022-10-15 07:47:20 +11:00
Mouse Reeve 143eaf362d Adds rate limiting to some views in nginx 2022-07-15 13:14:31 -07:00
Jason Kelly 318e0bf508 Fixing nginx-config misunderstanding. 2021-05-23 14:27:02 +08:00
Jason Kelly e138a585d1 Setting client_max_body_size to 10m.
- Removed commented-out nginx config for clarity.
2021-05-23 14:08:22 +08:00
Pablo Barton d38efa9a9d Easier to deploy by avoiding merge conflicts in production 2021-04-11 13:12:50 -04:00
Renamed from nginx/default.conf (Browse further)