javascript - No 'Access-Control-Allow-Origin' header is present on the requested resource -


i had error

xmlhttprequest cannot load http://domain.com/canvas/include/rs-plugin/js/extensions/revolution.extension.video.min.js. request header field x-requested-with not allowed access-control-allow-headers in preflight response.

i have these 2 lines @ top of php page load js file.

header("access-control-allow-origin: *"); 

but issues persist, should do.

i trying access

domain.com  js file subdomain.domain.com 

this header response

access-control-allow-origin:* connection:keep-alive

content-encoding:gzip content-length:4799 content-type:text/html

date:wed, 25 may 2016 06:28:04 gmt keep-alive:timeout=5, max=100

server:apache/2.4.7 (ubuntu) vary:host,accept-encoding

x-powered-by:php/5.5.9-1ubuntu4.14

try add access controll on htaccess origin domain.

<ifmodule mod_headers.c>    header set access-control-allow-origin "*" </ifmodule> 

is not secure allow access controll sites. replace "*" sign specific domain


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -