Open suau opened 3 years ago
swagger-ui-init.js
is generated at runtime which is what the options aren't send through. I have looked and couldn't see any easy way to set the options when using res.send.
The only way I can think is the workaround you have implemented or writing a function to convert the options to headers. I could initially do it for the cacheControl and then implement further options as issues are raised.
I just struggled with disabling cache-control,
serveWithOptions
ignores the cacheControl option forswagger-ui-init.js
. But it works for all other static files.As a workaround I added another handler to run before
serveWithOptions