Having CORS enabled on the app , but still throws an exception.

28 views
Skip to first unread message

Gokul Muthuswamy

unread,
Oct 27, 2017, 2:00:37 PM10/27/17
to Google App Engine
I have simple golang REST api app on GAE.  I'm using a gorilla mux router and enabled CORS as below:
httpServer = &http.Server{
Addr: ":8080",
Handler: handlers.CORS(
handlers.AllowedOrigins([]string{"*"}),
handlers.AllowedHeaders([]string{"Authorization", "Access-Control-Allow-Headers"}),
handlers.AllowedMethods([]string{"GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS"}))(router),
ReadTimeout:    timeout,
WriteTimeout:   timeout,
MaxHeaderBytes: 1 << 20,
}
}

Checked it on local deploys and its works well.  However on GAE it still returns a CORS error as below:
No access control origin header is present.


Jun (Cloud Platform Support)

unread,
Oct 27, 2017, 6:09:43 PM10/27/17
to Google App Engine

Hello Gokul,


Google Groups is meant for general product discussions and not for technical support.

 

It is recommended you open a Public Issue Tracker report with more information such as your project-id, app.yaml/appengine-web.xml configuration file, information about the timestamps of when this issue occurred.

Reply all
Reply to author
Forward
0 new messages