René's URL Explorer Experiment


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

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:779ca1b5-d574-87b8-024b-1d63b347e871
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC22A:102E20:7B9C44:ABD233:6A552899
html-safe-nonceb631e3534553f5ef0d6f96c5dc26a2123ed2bf59cf3e12dc438b9d8829aa26d2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjJBOjEwMkUyMDo3QjlDNDQ6QUJEMjMzOjZBNTUyODk5IiwidmlzaXRvcl9pZCI6IjU3NDczNTM3ODY0OTE2NzY4MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac5b3fdd43ac5f31a87da606ab9dd6efdf0965090559972759173bebd0a90d6ba4
hovercard-subject-tagpull_request:1126171607
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/github/codespaces-django/pull/8/files
twitter:imagehttps://avatars.githubusercontent.com/u/297042?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/297042?s=400&v=4
og:image:altPurpose 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_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None682d273eacb2ac51680c6eb9c0b270f029f7ce74c32090f319083c34497e28a5
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/github/codespaces-django git https://github.com/github/codespaces-django.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id533482936
octolytics-dimension-repository_nwogithub/codespaces-django
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id533482936
octolytics-dimension-repository_network_root_nwogithub/codespaces-django
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release358dd24ad7465d20e3fae729b5b169d35b0dd7f8
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codespaces-django/pull/8/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodespaces-django%2Fpull%2F8%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodespaces-django%2Fpull%2F8%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=github%2Fcodespaces-django
Reloadhttps://github.com/github/codespaces-django/pull/8/files
Reloadhttps://github.com/github/codespaces-django/pull/8/files
Reloadhttps://github.com/github/codespaces-django/pull/8/files
Please reload this pagehttps://github.com/github/codespaces-django/pull/8/files
github https://github.com/github
codespaces-djangohttps://github.com/github/codespaces-django
Notifications https://github.com/login?return_to=%2Fgithub%2Fcodespaces-django
Fork 155 https://github.com/login?return_to=%2Fgithub%2Fcodespaces-django
Star 128 https://github.com/login?return_to=%2Fgithub%2Fcodespaces-django
Code https://github.com/github/codespaces-django
Issues 3 https://github.com/github/codespaces-django/issues
Pull requests 3 https://github.com/github/codespaces-django/pulls
Actions https://github.com/github/codespaces-django/actions
Models https://github.com/github/codespaces-django/models
Security and quality 0 https://github.com/github/codespaces-django/security
Insights https://github.com/github/codespaces-django/pulse
Code https://github.com/github/codespaces-django
Issues https://github.com/github/codespaces-django/issues
Pull requests https://github.com/github/codespaces-django/pulls
Actions https://github.com/github/codespaces-django/actions
Models https://github.com/github/codespaces-django/models
Security and quality https://github.com/github/codespaces-django/security
Insights https://github.com/github/codespaces-django/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fgithub%2Fcodespaces-django%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgithub%2Fcodespaces-django%2Fissues%2Fnew%2Fchoose
joshaberhttps://github.com/joshaber
github:mainhttps://github.com/github/codespaces-django/tree/main
pamelafox:fix-csrfhttps://github.com/pamelafox/codespaces-django/tree/fix-csrf
Conversation 1 https://github.com/github/codespaces-django/pull/8
Findings https://github.com/github/codespaces-django/pull/8/findings
Commits 1 https://github.com/github/codespaces-django/pull/8/commits
Checks 0 https://github.com/github/codespaces-django/pull/8/checks
Files changed https://github.com/github/codespaces-django/pull/8/files
Please reload this pagehttps://github.com/github/codespaces-django/pull/8/files
Add csrf origin for codespaces https://github.com/github/codespaces-django/pull/8/files#top
Show all changes 1 commit https://github.com/github/codespaces-django/pull/8/files
56f8768 Add csrf origin for codespaces pamelafox Nov 17, 2022 https://github.com/github/codespaces-django/pull/8/commits/56f87681f735fd0a934e1d01860382e062cc8cb3
Clear filters https://github.com/github/codespaces-django/pull/8/files
Please reload this pagehttps://github.com/github/codespaces-django/pull/8/files
Please reload this pagehttps://github.com/github/codespaces-django/pull/8/files
hello_world/settings.pyhttps://github.com/github/codespaces-django/pull/8/files#diff-fa65d5f00eebf9166a11ee7b174573fd42e91884946b5712a2b12ba6d90a7d65
View file https://github.com/pamelafox/codespaces-django/blob/56f87681f735fd0a934e1d01860382e062cc8cb3/hello_world/settings.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codespaces-django/pull/8/{{ revealButtonHref }}
https://github.com/github/codespaces-django/pull/8/files#diff-fa65d5f00eebf9166a11ee7b174573fd42e91884946b5712a2b12ba6d90a7d65
https://github.com/github/codespaces-django/pull/8/files#diff-fa65d5f00eebf9166a11ee7b174573fd42e91884946b5712a2b12ba6d90a7d65
https://github.com/github/codespaces-django/pull/8/files#diff-fa65d5f00eebf9166a11ee7b174573fd42e91884946b5712a2b12ba6d90a7d65
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.