Last active
January 22, 2025 03:32
-
-
Save abbaspour/4be371d350250ce23881a5bcfd9b45a2 to your computer and use it in GitHub Desktop.
Auth0 Custom Domain Cloudflare Worker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
async fetch(request, env) { | |
request = new Request(request); | |
const url = new URL(request.url); | |
url.hostname = env.AUTH0_EDGE_RECORD; | |
request.headers.set('cname-api-key', env.CNAME_API_KEY); | |
const response = await fetch(url, request); | |
return response; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[observability.logs] | |
enabled = true | |
[vars] | |
AUTH0_EDGE_RECORD = "xxx.auth0.com" | |
CNAME_API_KEY = "yyy" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment