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
How to enabling gzip compression with asynchttpserver if is possible?
The text was updated successfully, but these errors were encountered:
Not possible at the minute. If you want gzip compression you can use nginx in front of it.
Sorry, something went wrong.
see the example from https://github.com/guzba/zippy/blob/master/examples/http_server.nim
import asyncdispatch, asynchttpserver, zippy let server = newAsyncHttpServer() proc cb(req: Request) {.async.} = if req.headers["Accept-Encoding"].contains("gzip"): # This client supports gzip, send compressed response let headers = newHttpHeaders([("Content-Encoding", "gzip")]) await req.respond( Http200, compress("gzip'ed response body", BestSpeed, dfGzip), headers ) else: await req.respond(Http200, "uncompressed response body") waitFor server.serve(Port(8080), cb)
No branches or pull requests
How to enabling gzip compression with asynchttpserver if is possible?
The text was updated successfully, but these errors were encountered: