MCPcopy Index your code
hub / github.com/bootdotdev/bootdev / cors

Function cors

cmd/login.go:102–108  ·  view source on GitHub ↗
(next http.Handler)

Source from the content-addressed store, hash-verified

100}
101
102func cors(next http.Handler) http.Handler {
103 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
104 w.Header().Set("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
105 w.Header().Set("Access-Control-Allow-Origin", "*")
106 next.ServeHTTP(w, r)
107 })
108}
109
110func startHTTPServer(inputChan chan string) {
111 handleSubmit := func(w http.ResponseWriter, r *http.Request) {

Callers 1

startHTTPServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected