This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Adding XSRF header when request is NOT same origin, but is TRUSTED origin (subdomain) #7862
Closed
Description
So this may (probably) just be that I'm not understanding XSRF prevention correctly, so feel free to tell me I'm an idiot. But currently in the code (
Lines 883 to 893 in dd1d189
urlIsSameOrigin(config.url)
. If it's not same origin, angular does not add the XSRF header token (X-XSRF-TOKEN
).
Now, that's all good. Except that I'm requesting api.example.com
from example.com
, which fails the same origin check. Should this be allowed? Or does that somehow completely break the XSRF prevention?