Skip to content

Commit ebdb92f

Browse files
Jed-Giblincippaciong
authored andcommitted
Added a header for serving the CSS so the browser can load it properly
* Added a header for serving the CSS so the browser can load it properly * Fixed spacing issue * fixing those spacing issues again
1 parent 0c0178a commit ebdb92f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

swagger.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ func WrapHandler(h *webdav.Handler) buffalo.Handler {
4141
case "doc.json":
4242
doc, _ := swag.ReadDoc()
4343
c.Response().Write([]byte(doc))
44+
case "swagger-ui.css":
45+
// The browser needs to interpret CSS as a stylesheet
46+
c.Response().Header().Add("Content-Type", "text/css")
47+
h.ServeHTTP(c.Response(), c.Request())
4448
default:
4549
h.ServeHTTP(c.Response(), c.Request())
4650

0 commit comments

Comments
 (0)