{"id":20535942,"url":"https://github.com/cyb3r-jak3/cf-example-cors-application","last_synced_at":"2026-02-08T22:02:00.584Z","repository":{"id":225917656,"uuid":"730935289","full_name":"Cyb3r-Jak3/cf-example-cors-application","owner":"Cyb3r-Jak3","description":"Example for CORs on two sites using Cloudflare access","archived":false,"fork":false,"pushed_at":"2026-01-01T18:51:25.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-07T02:33:56.509Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cyb3r-Jak3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-13T02:05:08.000Z","updated_at":"2026-01-01T18:51:22.000Z","dependencies_parsed_at":"2024-03-05T01:25:16.781Z","dependency_job_id":"7c59d2a9-5989-410a-9bcc-85bf9e293c2a","html_url":"https://github.com/Cyb3r-Jak3/cf-example-cors-application","commit_stats":null,"previous_names":["cyb3r-jak3/cf-example-cors-application"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Cyb3r-Jak3/cf-example-cors-application","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyb3r-Jak3%2Fcf-example-cors-application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyb3r-Jak3%2Fcf-example-cors-application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyb3r-Jak3%2Fcf-example-cors-application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyb3r-Jak3%2Fcf-example-cors-application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cyb3r-Jak3","download_url":"https://codeload.github.com/Cyb3r-Jak3/cf-example-cors-application/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyb3r-Jak3%2Fcf-example-cors-application/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29246422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T21:42:34.334Z","status":"ssl_error","status_checked_at":"2026-02-08T21:41:38.468Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T00:34:48.156Z","updated_at":"2026-02-08T22:02:00.567Z","avatar_url":"https://github.com/Cyb3r-Jak3.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloudflare CORS ACCESS\r\n\r\nExample of how to use CORS with Cloudflare access to pass credentials to a backend.\r\nReplace all `.community.cyberjake.xyz` with your domain.\r\n\r\nNeed the following:\r\n\r\nCloudflare Policies:\r\n\r\n- ![Cloudflare CORS policy](https://r2-sharex.cyberjake.xyz/file/2024/03/firefox_DawNag6jI1.png)\r\n- ![Cloudflare Access Application](https://r2-sharex.cyberjake.xyz/file/2024/03/firefox_AG7WxYmBLC.png)\r\n\r\n### Backend:\r\n\r\nCloudflare tunnel token with public hostnames as shown below.\r\n![Cloudflare Tunnel Public Hostnames](https://r2-sharex.cyberjake.xyz/file/2023/12/firefox_IRs6LwK788.png)\r\n\r\nEdit the cors settings in [backend/index.js](backend/index.js) to match your origin.\r\n\r\n### Frontend:\r\n\r\nEdit the `server_name` in [frontend/nginx.conf](frontend/nginx.conf) to match your domain.\r\n\r\n### Running:\r\n\r\n```bash\r\ndocker compose up --build\r\n```\r\n\r\nWait for the tunnel to connect and then visit `https://\u003cyour domain\u003e/` to see the frontend and watch the console for the response from the backend.\r\n\r\n## Demo\r\n\r\nView the demo at [https://frontend.community.cyberjake.xyz/](https://frontend.community.cyberjake.xyz/).\r\n\r\n#### Demo Notes\r\n\r\n- It does require to verify with an email address to access the site.\r\n- I am able to see emails that sign up, so please don't use any sensitive information. You can use a temporary email service like [Temp Mail](https://temp-mail.org/) to get a temporary email address.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyb3r-jak3%2Fcf-example-cors-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyb3r-jak3%2Fcf-example-cors-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyb3r-jak3%2Fcf-example-cors-application/lists"}