Set Access-Control-Allow-Origin header to load external CSS
With Chrome 70, I didn’t get the bootstrap CSS files anymore.
This commit is contained in:
parent
2216841c80
commit
25dc781a8e
@ -100,6 +100,8 @@ func initStatus(services []*service) {
|
||||
}
|
||||
})
|
||||
http.HandleFunc("/status", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
|
||||
token := xsrfTokenFromCookies(r.Cookies())
|
||||
if token == 0 {
|
||||
// Only generate a new XSRF token if the old one is expired, so that
|
||||
@ -140,6 +142,8 @@ func initStatus(services []*service) {
|
||||
})
|
||||
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
|
||||
var st unix.Statfs_t
|
||||
if err := unix.Statfs("/perm", &st); err != nil {
|
||||
log.Printf("could not stat /perm: %v", err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user