added correct content type for css
This commit is contained in:
parent
e372a4e04e
commit
7f84b08a6b
3
main.go
3
main.go
@ -46,6 +46,9 @@ func static(w http.ResponseWriter, req *http.Request) {
|
|||||||
http.Error(w, "file not found", http.StatusNotFound)
|
http.Error(w, "file not found", http.StatusNotFound)
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
|
if req.URL.Path == "/math.css" {
|
||||||
|
w.Header().Set("Content-Type", "text/css")
|
||||||
|
}
|
||||||
_, err := w.Write(content)
|
_, err := w.Write(content)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, "problem writing response", http.StatusInternalServerError)
|
http.Error(w, "problem writing response", http.StatusInternalServerError)
|
||||||
|
Loading…
Reference in New Issue
Block a user