0

As I am working on a research, I need allow users to read my JavaScript file using Ajax. However, I want to make sure about consequences of adding Access-Control-Allow-Origin header for just this file.

Access-Control-Allow-Origin: *

I know about the goal of origin control and all examples about accessing behalf of user. However, enabling this feature for just one static JS file can cause any security problem?

Any help is appreciated.

1

I don't think it can really cause any harm on a Javascript file. The problem starts when this is possible on a web page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.