-
Notifications
You must be signed in to change notification settings - Fork 89
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
GZIP Compression #199
Comments
This is perfectly reasonable, but should be done at the level of server integrations. Serving exported apps with gzip should be the responsibility of the file host. This should just be a matter of using the right middleware for each integration. (PRs are welcome!) |
warp already supports it |
Yeah certainly! Do you want to submit a PR for that? |
yes |
i think this should be What i would like is if pre-rendered pages (and any other relevant assets) were automatically, statically gzipped by Perseus, so nginx could serve that without anything using on-the-fly gzip compression. |
could you elaborate how the dynamic warp compression filter would be exploitable in that way? also i'll build it into the perseus builder pattern |
The idea of static gzipping is attractive, but only in certain cases. Overall, I think it should be done at request time, simply because Perseus needs to read and modify the stuff on disk extensively when being run aa a server. When exported, I think it should be solely the responsibility of the server the user chooses, just to make things simple. |
@danielnehrig I don't know anything about Warp's implementation and was only referring to on-the-fly compression side channel attacks, in general; like BREACH @arctic-hen7 I only mention static gzipping as a safe alternative way to get some compression benefits when feasible, not suggesting as a complete replacement for every project. I can also believe that on-the-fly compression is more convenient to implement and is certainly more comprehensive in it's coverage. FWICT, (and IIRC) it is also fundamentally insecure.
would that also include the manual enabling of the feature? because that's what i'm mainly concerned with. I think any on-the-fly compression option should be documented as a possible security risk and made |
yes it would be opt-in |
@ITwrx understood. With static exporting, the user uses some third-party program to serve their files, which should handle any compression independently of Perseus. I think what @danielnehrig means by the builder pattern is the |
Correct that's what I meant what would you prefer though over feature flag or the builder pattern ? |
@danielnehrig I think the feature flag approach would work best. |
alright then |
Having looked into all this further, I think compression should be the default for the Wasm bundle in particular (since I've had reports on Discord of up to seven point Lighthouse improvements, to 100, with vs. without this), and shoudl be done statically. To my understanding, BREACH is not a concern here because it's a static file with no secrets in it. As for page states, that should be completely opt-in if we even decide to support it at all. But brotli compression of the Wasm bundle should be done automatically by the CLI (with an argument to disable this behavior). There should also be gzip compression, and server integrations should be responsible for figuring out what to send. I recall this article had some nice explanations of this. @danielnehrig are you still thinking of working on this? |
i would tackle this next after the cookies #158 implementation but probably only for warp for now since i've already implemented that for my project |
This issue is requesting an enhancement to Perseus. Details of the scope will be available in issue labels.
The user described the problem related to this request as follows:
The user described the issue as follows:
Tribble internal data
dHJpYmJsZS1yZXBvcnRlZCxDLWVuaGFuY2VtZW50LGF1dGhvci13aWxsaW5nLXRvLWltcGw=
The text was updated successfully, but these errors were encountered: