You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have thought about this in the past already, and decided, that enforcing a protocol is not the task of this middlware. As express-static-gzip supports multiple/any comporessions the developer should be responsible for prerequisits that come with any of these.
Specific on your https case, i wonder why not always use https and therefore enforce it on all endpoints as https has become the defacto standard since the snowden revelations.
If you just want to ensure compressed files are send on https i would recommend adding a simple 'middleware' on top. For example like this pseudo code example:
one of the requirements for serving brotli encryption is a https protocol.
right now, when setting up
express-static-gzip
with brotli enabled, any request not over https fails.would it be possible to verify
req
protocol ishttps
before trying to serve.br
files?The text was updated successfully, but these errors were encountered: