We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cors -> nativo em nosso ambiente middleware Cors -> não nativo externo atribuindo a rota ( FOCAR NESTE )
c := cors.New(cors.Options{ AllowedOrigins: []string{"http://foo.com"}, })
mux := http.NewServeMux() mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") w.Write([]byte("{\"hello\": \"world\"}")) }) n := negroni.Classic() n.Use(c) n.UseHandler(mux) n.Run(":3000")
Example: https://github.com/rs/cors/blob/master/examples/negroni/server.go
The text was updated successfully, but these errors were encountered:
rAndrade360
No branches or pull requests
Cors -> nativo em nosso ambiente middleware
Cors -> não nativo externo atribuindo a rota ( FOCAR NESTE )
c := cors.New(cors.Options{
AllowedOrigins: []string{"http://foo.com"},
})
Example:
https://github.com/rs/cors/blob/master/examples/negroni/server.go
The text was updated successfully, but these errors were encountered: