Autostrip functionality #6
flowchartsman
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Essentially this library is a union wrapper over an embedded FS, so it's currently necessary to call
http.StripPrefix
, just as you would when usinghttp.FS
to wrap anfs.FS
, however,swaggerui
is intended to be a convenient "out-of-the-box" integration, and having a mandatory stdlib call for every invocation is kind of a pain. With a little thought, it might be possible to have the handler inspect the route path and automatically determine the prefix and serve up the correct file(s).Given that the wrapped FS does not actually reference the filesystem, there shouldn't be any problems with attempted path traversals.
If this is something people want to see for V1, please vote via 👍/👎 and feel free to discuss your opinion below (esp. in the case of 👎)
Beta Was this translation helpful? Give feedback.
All reactions