We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey @Gusb3ll , can you add support for elysia 0.8, the current version of elysia-compression is breaking in elysia 0.8
The text was updated successfully, but these errors were encountered:
Same issue here, was wondering why cookies were not working and cors failing xD
Sorry, something went wrong.
If anyone is facing the same issue, here's how I fixed it for mine
import { Elysia } from "elysia"; import { gzipSync } from "bun"; export function compression() { return new Elysia({ name: '@elysiaplugin/compression' }).mapResponse(({ response }) => { return new Response( gzipSync( typeof response === "object" ? JSON.stringify(response) : response.toString() ) ); }); }
Referenced from Official Elysia Docs: https://elysiajs.com/life-cycle/map-response.html#example
And then you can use it as a plugin middleware for your main app
app.use(compression())
Gusb3ll
No branches or pull requests
Hey @Gusb3ll , can you add support for elysia 0.8, the current version of elysia-compression is breaking in elysia 0.8
The text was updated successfully, but these errors were encountered: