Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NGINX : Allowed (static) files #3232

Closed
prolibre opened this issue Jan 19, 2024 · 0 comments · Fixed by #3238
Closed

NGINX : Allowed (static) files #3232

prolibre opened this issue Jan 19, 2024 · 0 comments · Fixed by #3238
Assignees
Labels
bug Something isn't working

Comments

@prolibre
Copy link

prolibre commented Jan 19, 2024

I'm opening a ticket because it's possible that some of my previous comments have gone unnoticed (my fault, I've posted messages here and there).

I've had a look at the various files in static and I've come up with this configuration for my apache2 server (and therefore the equivalent under NGINX) :

"(?i).(gif|bmp|ico|jpg|jpeg|png|tif|tiff|webp|css|js|ttf|svg|woff)$"

On my server, some cover images are in gif format. Sometimes there are also capital letters in the extension (JPG) => (?i)
I add woof for the font used in administration.

SELECT DISTINCT SPLIT_PART(SPLIT_PART(cover, '.', ARRAY_LENGTH(STRING_TO_ARRAY(cover, '.'), 1)), '?', 1) AS extension FROM "public"."bookwyrm_book" WHERE cover!='';

gif
jpg
png
webp
JPG
jpeg

Well... I'll leave you in peace for the weekend :-)

EDIT: I'm not sure about the woff fonts... I seem to have seen a 404 somewhere.

@prolibre prolibre added the bug Something isn't working label Jan 19, 2024
@hughrun hughrun self-assigned this Jan 20, 2024
MaggieFero added a commit to phildini/bookwyrm that referenced this issue Mar 2, 2024
* 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 bookwyrm-social#3227
fixes bookwyrm-social#3231
fixes bookwyrm-social#3232
fixes bookwyrm-social#3236

* fix comment in env example

* Fixes translation tags

* Add search for author

* Support DATA_UPLOAD_MAX_MEMORY_MiB, only, in .env

Since arithmetic is not allowed in .env files, a change in unit for
the variable seems most usable.

* Adds production.conf security configuration missing in version 0.7.2

---------

Co-authored-by: Hugh Rundle <hugh@hughrundle.net>
Co-authored-by: Mouse Reeve <mousereeve@riseup.net>
Co-authored-by: Bart Schuurmans <bart@minnozz.com>
Co-authored-by: Adeodato Simó <dato@users.noreply.github.com>
Co-authored-by: Hugh Rundle <github@hughr.me>
Co-authored-by: FoW <fow@netspheres.org>
MaggieFero added a commit to phildini/bookwyrm that referenced this issue Mar 3, 2024
* 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 bookwyrm-social#3227
fixes bookwyrm-social#3231
fixes bookwyrm-social#3232
fixes bookwyrm-social#3236

* fix comment in env example

* Fixes translation tags

* Add search for author

* Support DATA_UPLOAD_MAX_MEMORY_MiB, only, in .env

Since arithmetic is not allowed in .env files, a change in unit for
the variable seems most usable.

* Adds production.conf security configuration missing in version 0.7.2

* Add timeout to isbn.py

An instance of requests.get in isbn.py lacks a timeout, and this commit adds one with a default of 15 as used other places in the code, where requests.get does already have a timeout.

* Add timeout to base_activity.py

An instance of requests.get was missing a timeout; this commit adds a timeout of 15 as used in other places in this codebase which already have timeouts.

* Typo fix

Add a comma

* Remove duplicate types-requests==2.31.0.2

The types-requests==2.31.0.2 dependency was double-listed right next to each other; this commit removes one.

* Alphabetize requirements.txt

Alphabetize requirements.txt for developer convenience; this helps to find duplicates and unnecessarily-pinned subdependencies, as well as making the file easier to read and use.

* Upgrade Python Version from 3.9 to 3.11

* Disable Pylint Failure for imghdr deprecation for now

* Upgrade Celery to 5.3.1

* Upgrade django-celery-beat to 2.5.0

* Upgrade django-compressor to 4.4

* Upgrade flower to 2.0.0

* Add grpcio pin @ 1.57.0

* Pin Tornado at 6.3.3

* Upgrade Pylint to 2.15.0

* Upgrade pytest to 6.2.5

* Pin setuptools at 65.5.1

* Fix typo in operator

* Add extra space required by linter

* Fix spacing for linter

* Add linter exclusion for TBookWyrmModel

---------

Co-authored-by: Hugh Rundle <hugh@hughrundle.net>
Co-authored-by: Mouse Reeve <mousereeve@riseup.net>
Co-authored-by: Bart Schuurmans <bart@minnozz.com>
Co-authored-by: Adeodato Simó <dato@users.noreply.github.com>
Co-authored-by: Hugh Rundle <github@hughr.me>
Co-authored-by: FoW <fow@netspheres.org>
MaggieFero pushed a commit to phildini/bookwyrm that referenced this issue May 14, 2024
- 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 bookwyrm-social#3227
fixes bookwyrm-social#3231
fixes bookwyrm-social#3232
fixes bookwyrm-social#3236
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants