We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 052a3c4 + 2ddb071 commit 2ce122aCopy full SHA for 2ce122a
swagger.go
@@ -41,6 +41,10 @@ func WrapHandler(h *webdav.Handler) buffalo.Handler {
41
case "doc.json":
42
doc, _ := swag.ReadDoc()
43
c.Response().Write([]byte(doc))
44
+ case "swagger-ui-bundle.js", "swagger-ui.js", "swagger-ui-standalone-preset.js":
45
+ // The browser needs to interpret JS as a JS scripts
46
+ c.Response().Header().Add("Content-Type", "application/javascript")
47
+ h.ServeHTTP(c.Response(), c.Request())
48
case "swagger-ui.css":
49
// The browser needs to interpret CSS as a stylesheet
50
c.Response().Header().Add("Content-Type", "text/css")
0 commit comments