-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
add client overrides to nginx configuration #3297
add client overrides to nginx configuration #3297
Conversation
Hi @JohnXLivingston, this configuration of nginx works for you ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not merge the two with:
location ~ ^/client/assets/images/(logo\.svg|favicon\.png|icons/icon-(36x36|48x48|72x72|96x96|144x144|192x192|512x512)\.png)$
@rigelk I've merged the rules with more explicit file names in the regexp, it's long but better, I think, to maintain. |
2056071
to
deaf6b8
Compare
It works... But it is no more dynamic... If files don't exist, it fails and there are missing icons. Or I'm I missing something? (I don't really know nginx syntax) |
Thanks @JohnXLivingston
Sorry I don't see what you mean by "dynamic", you mean nginx ?
What kind of failure ? The icons should not be missing if the dist client directory exists, would you make a screenshot or a copy of your error ? |
deaf6b8
to
fab5ecc
Compare
As I said, I'm not familiar with nginx configuration, perhaps I'm wrong. What happens if the try_files directive don't find the file? If it continues to the next «location ~»? In this case, my bad, it's ok. |
Co-authored-by: Rigel Kent <[email protected]>
@kimsible thanks a lot for spotting and fixing the issue! |
Are the config key storage.client_overrides, the constant CLIENT_OVERRIDES_DIR and the associated code in server/controllers/client.ts still needed? |
Yes, as not everybody uses nginx as a reverse proxy. |
Description
In production client-overrides don't work with nginx because client assets were bypassed without considering client-overrides handled in PeerTube.
Related issues
Has this been tested?
I tested it with production scripts, it may need more tests ? @rigelk ?