Title: Add csrf origin for codespaces by pamelafox · Pull Request #8 · github/codespaces-django · GitHub
Open Graph Title: Add csrf origin for codespaces by pamelafox · Pull Request #8 · github/codespaces-django
X Title: Add csrf origin for codespaces by pamelafox · Pull Request #8 · github/codespaces-django
Description: Purpose Currently, due to the way Codespace "local" URLs work, it's not possible to log in to the Django admin panel. A CSRF error displays instead. This PR overrides CSRF_TRUSTED_ORIGINS when the app is using the development settings and when an environment variable is present that indicates its running in Codespaces. How to Test Both in Codespaces and locally: python manage.py createsuperuser python manage.py runserver Try logging into /admin with your superuser credentials. It won't work in the embedded browser since that seems to disable cookies. However, it should work if you pop it out.
Open Graph Description: Purpose Currently, due to the way Codespace "local" URLs work, it's not possible to log in to the Django admin panel. A CSRF error displays instead. This PR overrides CSRF_TRUSTED_ORI...
X Description: Purpose Currently, due to the way Codespace "local" URLs work, it's not possible to log in to the Django admin panel. A CSRF error displays instead. This PR overrides CSRF...
Opengraph URL: https://github.com/github/codespaces-django/pull/8
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:779ca1b5-d574-87b8-024b-1d63b347e871 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C22A:102E20:7B9C44:ABD233:6A552899 |
| html-safe-nonce | b631e3534553f5ef0d6f96c5dc26a2123ed2bf59cf3e12dc438b9d8829aa26d2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjJBOjEwMkUyMDo3QjlDNDQ6QUJEMjMzOjZBNTUyODk5IiwidmlzaXRvcl9pZCI6IjU3NDczNTM3ODY0OTE2NzY4MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5b3fdd43ac5f31a87da606ab9dd6efdf0965090559972759173bebd0a90d6ba4 |
| hovercard-subject-tag | pull_request:1126171607 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/github/codespaces-django/pull/8/files |
| twitter:image | https://avatars.githubusercontent.com/u/297042?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/297042?s=400&v=4 |
| og:image:alt | Purpose Currently, due to the way Codespace "local" URLs work, it's not possible to log in to the Django admin panel. A CSRF error displays instead. This PR overrides CSRF_TRUSTED_ORI... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 682d273eacb2ac51680c6eb9c0b270f029f7ce74c32090f319083c34497e28a5 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/github/codespaces-django git https://github.com/github/codespaces-django.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 533482936 |
| octolytics-dimension-repository_nwo | github/codespaces-django |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 533482936 |
| octolytics-dimension-repository_network_root_nwo | github/codespaces-django |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 358dd24ad7465d20e3fae729b5b169d35b0dd7f8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width