mirror of
https://github.com/stoatchat/self-hosted.git
synced 2026-07-21 04:25:24 -04:00
Make GZIP/BROTLI compression of 'sirv' configurable #18
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kuhnchris on GitHub (Dec 30, 2021).
Hi,
after trying to initially setup a Revolt instance I kind of failed to realize that my reverse proxy (traefik) has issues with the pre-configured gzip and brotli compression of the sirv server used by the "web" container.
I had to go into the container and modify the package.json script to
as the default setting of sirv is to activate GZip and Brotli compression (i.e. adding -G false and -B false)
So adding a setting in the .env file would enable us to disable the gzip and brotli compression and have revolt usable via a reverse proxy.
Maybe I overlooked something in the documentation?
Thanks!
@Pupyrinth commented on GitHub (Jan 1, 2022):
Doesn't seem it's just your reverse proxy.
I've been having issue running the quick start on my pc to try Revolt out and ran into an issue with the web not loading. In docker console it looked alright, but when I checked the console in my browser I was getting "ERR_CONTENT_DECODING_FAILED", a quick google search showed something about GZIP.
Going into the container and modifying like you did fixed it though.
Don't really have anything else to add, just thought I'd share my part of it as well. At least to what feels to be a similar issue.
@insertish commented on GitHub (Jan 2, 2022):
Compression plugin appears to have been spitting out incorrectly named files, should be fixed in latest client build.
@kuhnchris commented on GitHub (Jan 4, 2022):
The "compression plugin" of sirv, or something within revoltchat?
And "latest client build" of sirv or directly via docker image of revoltchat?
Thanks!
@insertish commented on GitHub (Jan 5, 2022):
The issue was with
vite-plugin-compressionspitting out.gzsuffixed files when doing Brotli compression, I believe that caused the issue. Might have been a configuration error, either way I just fell back to default Vite configuration.@kuhnchris commented on GitHub (Jan 5, 2022):
OK thanks, I'll try to update the image on my server and try it again with my traefik proxy.
@kuhnchris commented on GitHub (Jan 6, 2022):
I can confirm this now works in the default config with a reverse proxy like Traefik - closing.