Skip to content

Conversation

@ryan953
Copy link
Member

@ryan953 ryan953 commented Jan 10, 2026

We need the csrf token so the toolbar can make POST/PUT requests and make the toolbar read/write.

We need the csrf token so the toolbar can make POST/PUT requests and make the toolbar read/write.
@ryan953 ryan953 requested review from a team as code owners January 10, 2026 23:38
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 10, 2026
…t by django in the response phase, after this view has finished.
document.cookie = getCookieValue(cookie, window.location.hostname);
log('Saved a cookie', document.cookie.indexOf(cookie) >= 0);
}
if (csrfToken) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we log if csrf token isn't found?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also important is handling it on the UI side so things gracefully degrade.

There's no Sentry on this page now afaik, we'd need to load in from the CDN, so i'll take that as a followup for this whole html template.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but we're relying on middleware... so i think the odds of not having it are low. unless it's misconfigured for this page.

@ryan953 ryan953 merged commit 648a2c5 into master Jan 12, 2026
66 checks passed
@ryan953 ryan953 deleted the ryan953/toolbar-POST-with-csfr-token branch January 12, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants