Jump to content

Recommended Posts

Posted

Not sure if this is possible for a plain js file. Krydos would know more.

I know for PHP, people have done it with header(), so I guess worst case you could make a PHP file that sends your headers (content-type is the minimum, and in your case obviously the CORS headers), then just call readfile() to spit out the js.

Posted

You can set CORS headers with .htaccess

Header set Access-Control-Allow-Origin "https://example.com"

 

  • Krydos changed the title to [Solved] Allow CORS on the Server
  • Krydos locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...