Jump to content

Access-Control-Allow-Origin with #include File


Recommended Posts

I have an ASP page that an outside company is requesting via AJAX. I've added "Access-Control-Allow-Origin", "*" to the response.addheader and everything works just fine. As soon as I add an <--#include file-->, the page does not work anymore. Can anyone tell me if this page structure is not allowed, or am I just doing something wrong? Thanks,

Link to comment
Share on other sites

You only need to set headers once, there is only one set of headers for a response. But if you include a file before setting the headers then something in that file may interfere with the headers getting set. It's better to set the headers before including a file that may cause a problem.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...