Add more CORS headers

pull/1/head
maru 2023-12-29 14:34:58 -05:00
parent 955359c3b1
commit d533eeee5f
No known key found for this signature in database
GPG Key ID: 37689350E9CD0F0D
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,8 @@ type Server struct {
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if s.Debug {
w.Header().Set("Access-Control-Allow-Headers", "*")
w.Header().Set("Access-Control-Allow-Methods", "*")
w.Header().Set("Access-Control-Allow-Origin", "*")
if r.Method == "OPTIONS" {