chore(api): reorganize web assets and codegen types+handlers
This commit is contained in:
10
webserver/router/middleware/cors.go
Normal file
10
webserver/router/middleware/cors.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// EnableCors enables the CORS header on the responses.
|
||||
func EnableCors(w http.ResponseWriter) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
}
|
||||
Reference in New Issue
Block a user