Monday, June 11, 2012

Re: Revisiting cross-site requests: CORS and development mode



On Monday, June 11, 2012 4:07:57 AM UTC+2, Christopher Piggott wrote:
I've been revisiting the cross-site request approaches (currently using JSONP) and tried to search the mailing list for this answer but didn't find it.

Is it possible to modify development mode to send an Access-Control-Allow-Origin header?

Er, I'm puzzled. If you use Dev Mode's embedded server to serve your data, then you don't hit the SOP, right? and thus you don't need CORS? Or have I missed something obvious?

That being said, you have several solutions:
  • configure a servlet filter in your web.xml that adds the header to your responses (clearly the easiest solution)
  • copy com.google.gwt.dev.shell.jetty.JettyLauncher and modify it to send the ACAO header, and pass the -server argument to DevMode to use your class.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/GrWQBC0OUWkJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate