1

Is it possible to allow read-only access in a CORS header? I want JS from two websites to be capable of verifying each other, but not altering each other.

2 Answers 2

2

I'm not quite sure what you mean by read-only in this case, because it does depend on the web application using the HTTP-methods/verbs correctly, but this might help:

Access-Control-Allow-Methods: GET
-1

The answer to this is no, there is no way to make resources on a page read-only to JavaScript loaded from another domain.

2
  • I'm not sure who voted this down but it is correct, I wasted a great deal of time trying to make it work.
    – Indolering
    Dec 16, 2013 at 4:42
  • I think nobody knows what do you mean by read-only. Javascript can never alter server (or local except local storage) files, so whatever you retrieve is readonly unless you create server (or local) API to save the changes javascript has made. That being said, both your answer and question are quite unclear. Nov 22, 2014 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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