Web Connection
Access-Control-Allow-Origin
Gravatar is a globally recognized avatar based on your email address. Access-Control-Allow-Origin
  n/a
  All
  Mar 27, 2015 @ 07:31am
How would I add this in the header.. I need to pass data from one domain to another.. I dont want to use jsonp... my response domain just needs something like
Access-Control-Allow-Origin: http://siteA.com in the header when responding from siteB
I already put this in the header .. and in the console I still get:
XMLHttpRequest cannot load http://spairs.shields-e.us/shieldsweb/invsearch.sw?perform=CHATNOTIFY&entit…t&user=BILLY%20SMITH%20**%20(SHIELDS)&datax=DATA1&uniqueseed=1427475523443. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://spairs.shields-e.us:3001' is therefore not allowed access.

Thanks
JIm

Gravatar is a globally recognized avatar based on your email address. Re: Access-Control-Allow-Origin
  Rick Strahl
  Jim M
  Mar 27, 2015 @ 11:12am

Response.AppendHeader("Access-Control-Allow-Origin","*")

You can do this per request or if you want it global for a process class put it in OnProcessInit().

+++ Rick ---



How would I add this in the header.. I need to pass data from one domain to another.. I dont want to use jsonp... my response domain just needs something like
Access-Control-Allow-Origin: http://siteA.com in the header when responding from siteB
I already put this in the header .. and in the console I still get:
XMLHttpRequest cannot load http://spairs.shields-e.us/shieldsweb/invsearch.sw?perform=CHATNOTIFY&entit…t&user=BILLY%20SMITH%20**%20(SHIELDS)&datax=DATA1&uniqueseed=1427475523443. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://spairs.shields-e.us:3001' is therefore not allowed access.

Thanks
JIm



Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: Access-Control-Allow-Origin
  n/a
  Rick Strahl
  Mar 28, 2015 @ 02:52am
Thanks Rick.. I'll try it..

Response.AppendHeader("Access-Control-Allow-Origin","*")

You can do this per request or if you want it global for a process class put it in OnProcessInit().

+++ Rick ---



How would I add this in the header.. I need to pass data from one domain to another.. I dont want to use jsonp... my response domain just needs something like
Access-Control-Allow-Origin: http://siteA.com in the header when responding from siteB
I already put this in the header .. and in the console I still get:
XMLHttpRequest cannot load http://spairs.shields-e.us/shieldsweb/invsearch.sw?perform=CHATNOTIFY&entit…t&user=BILLY%20SMITH%20**%20(SHIELDS)&datax=DATA1&uniqueseed=1427475523443. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://spairs.shields-e.us:3001' is therefore not allowed access.

Thanks
JIm



Gravatar is a globally recognized avatar based on your email address. Re: Access-Control-Allow-Origin
  n/a
  Rick Strahl
  Mar 28, 2015 @ 03:39am
I was trying to use response.header.. I didn't know there was an appendheader.. I should have read the docs.. anyhow.. it worked perfectly..

Thanks
Jim


Response.AppendHeader("Access-Control-Allow-Origin","*")

You can do this per request or if you want it global for a process class put it in OnProcessInit().

+++ Rick ---



How would I add this in the header.. I need to pass data from one domain to another.. I dont want to use jsonp... my response domain just needs something like
Access-Control-Allow-Origin: http://siteA.com in the header when responding from siteB
I already put this in the header .. and in the console I still get:
XMLHttpRequest cannot load http://spairs.shields-e.us/shieldsweb/invsearch.sw?perform=CHATNOTIFY&entit…t&user=BILLY%20SMITH%20**%20(SHIELDS)&datax=DATA1&uniqueseed=1427475523443. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://spairs.shields-e.us:3001' is therefore not allowed access.

Thanks
JIm



© 1996-2024