Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gui: Set CSRF stuff earlier (fixes #3138) #3152

Closed
wants to merge 1 commit into from
Closed

gui: Set CSRF stuff earlier (fixes #3138) #3152

wants to merge 1 commit into from

Conversation

calmh
Copy link
Member

@calmh calmh commented May 22, 2016

Purpose

We need to set these properties before Angular starts making requests,
and doing that from the response to a request is too late. The obvious
choice (to me) would be to use the angular $cookies service, but that
service isn't available until after initialization so we can't use it.
Instead, add a special file that is loaded by index.html and includes
the info we need before the JS app even starts running.

Testing

Manually, no 403s in my browser any more.

We need to set these properties *before* Angular starts making requests,
and doing that from the response to a request is too late. The obvious
choice (to me) would be to use the angular $cookies service, but that
service isn't available until after initialization so we can't use it.
Instead, add a special file that is loaded by index.html and includes
the info we need before the JS app even starts running.
@AudriusButkevicius
Copy link
Member

@st-review merge

@st-review
Copy link

@AudriusButkevicius: Build status is pending. I'll wait until it goes green and then merge!

@st-review
Copy link

👌 Merged as 4bc2b3f. Thanks, @calmh!

st-review pushed a commit that referenced this pull request May 22, 2016
We need to set these properties *before* Angular starts making requests,
and doing that from the response to a request is too late. The obvious
choice (to me) would be to use the angular $cookies service, but that
service isn't available until after initialization so we can't use it.
Instead, add a special file that is loaded by index.html and includes
the info we need before the JS app even starts running.

GitHub-Pull-Request: #3152
@st-review st-review closed this May 22, 2016
@calmh calmh deleted the cookies branch May 22, 2016 10:26
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Jun 16, 2017
@syncthing syncthing locked and limited conversation to collaborators Jun 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants