wavefree / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

cors header not working, getting error is not allowed by Access-Control-Allow-Origin #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I make a http request to 
http://app.scanscout.com/ssframework/adStreamJSController.xml?a=getadschedulefor
content&jsa=Y&fetchads=preroll&ss_partnerId=372341&ss_mediaId=171213&ss_mediaTit
le=Run%20Of%20Video%20Network&ssVMaxd=30&ss_pageURL=http%3A//dev2.history.com/ch
romecast&ss_streamPageURL=http%3A//dev2.history.com/chromecast&ss_asVersion=3&fo
rmat=vast2.0&wrapper=true&ss_width=640&ss_height=480&ss_acceptNonvideo=N&ss_rand
=40174411

from http://dev2.history.com/chromecast

I get following error:

XMLHttpRequest cannot load 
http://app.scanscout.com/ssframework/adStreamJSController.xml?a=getadschedulefor
content&jsa=Y&fetchads=preroll&ss_partnerId=372341&ss_mediaId=171213&ss_mediaTit
le=Run%20Of%20Video%20Network&ssVMaxd=30&ss_pageURL=http%3A//dev2.history.com/ch
romecast&ss_streamPageURL=http%3A//dev2.history.com/chromecast&ss_asVersion=3&fo
rmat=vast2.0&wrapper=true&ss_width=640&ss_height=480&ss_acceptNonvideo=N&ss_rand
=40174411 Origin http://dev2.history.com is not allowed by 
Access-Control-Allow-Origin. 

However the response Headers from the requested url have the 
Access-Control-Allow-Origin:*

Response Headers

Access-Control-Allow-Origin:*
Cache-Control:max-age=0, no-cache, no-store
Connection:keep-alive
Content-Encoding:gzip
Content-Language:en-US
Content-Length:1329
Content-Type:text/xml;charset=UTF-8
Date:Fri, 23 Aug 2013 15:31:09 GMT
Expires:Fri, 23 Aug 2013 15:31:09 GMT
p3p:policyref="/w3c/p3p.xml", CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
Pragma:no-cache
Server:Apache
Set-Cookie:JSESSIONID=A579539C3378AF69234788F69541CB63; Path=/ssframework
Set-Cookie:bkdu="16291,130813,0,kvbkcat22599|37401,130813,0,kvbkcat25306|17941,1
30813,0,kvbkcat36445|40491,130813,0,kvbkcat36488"; Version=1; 
Domain=.scanscout.com; Max-Age=31536000; Expires=Sat, 23-Aug-2014 15:31:09 GMT; 
Path=/
Set-Cookie:tgdu="35201,130821,0,kvtap4041|35251,130821,0,kvtap4074|37511,130821,
0,kvtap4012_kvtap4031|37641,130821,0,kvtap4012|35221,130821,0,kvtap4071|35211,13
0821,0,kvtap4070|40461,130821,0,kvty1948|35191,130821,0,kvtap4040|35231,130821,0
,kvtap4072|40341,130821,0,kvtgF|35171,130821,0,kvtap4012"; Version=1; 
Domain=.scanscout.com; Max-Age=31536000; Expires=Sat, 23-Aug-2014 15:31:09 GMT; 
Path=/
Vary:Accept-Encoding

Original issue reported on code.google.com by neekipa...@gmail.com on 23 Aug 2013 at 3:37

GoogleCodeExporter commented 9 years ago

Original comment by l...@google.com on 27 Aug 2013 at 12:46

GoogleCodeExporter commented 9 years ago

Original comment by l...@google.com on 27 Aug 2013 at 12:47

GoogleCodeExporter commented 9 years ago
Thank you for your support of Chromecast.  We've just released a major update 
to the Google Cast SDK and will be closing your issue.

Take a look at http://googledevelopers.blogspot.com/ for more information.

Original comment by l...@google.com on 3 Feb 2014 at 11:19

GoogleCodeExporter commented 9 years ago
We know this status is Obsolete.  However, we are having this issue with:

"XMLHttpRequest cannot load https://site.com/. No 'Access-Control-Allow-Origin' 
header is present on the requested resource. Origin 'http://mysite' is 
therefore not allowed access."

Yet from a regular web site (non-chromecast) the request is successful:
Response Headers:
Access-Control-Allow-Methods:GET
Access-Control-Allow-Origin:*
Access-Control-Max-Age:300
Connection:Keep-Alive
Content-Length:384
Content-Type:application/json;
Date:Thu, 07 Aug 2014 19:59:43 GMT
Keep-Alive:timeout=5, max=100
Server:Apache/2.2.22 (Ubuntu)

Original comment by jo...@thecpigroup.com on 7 Aug 2014 at 8:11