G
G
grabbee2021-08-21 17:02:48
symfony
grabbee, 2021-08-21 17:02:48

Why do they get into the cache without Access-Control-Allow-Origin?

Symphony's Api uses the nelmio_cors bundle - it puts headers in accordance with 'Origin', but requests without Access-Control-Allow-Origin in the response somehow got there, which causes a CORS error in the browser.

vary: ['Accept', 'Content-Type', 'Origin']

'Accept' added just in case. I can't understand how this happens. It is an accident? Am I missing something? There is a possibility that for some time there was no 'Origin' in vary - but after that the cache was cleared.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question