yinks
yinks
Explore posts from servers
CDCloudflare Developers
Created by yinks on 8/19/2024 in #workers-help
No loader is configured for ".node" files
sigh
3 replies
CDCloudflare Developers
Created by yinks on 7/25/2024 in #workers-help
Is there a way to specify the wrangler file directory?
Thank you!
11 replies
CDCloudflare Developers
Created by yinks on 7/25/2024 in #workers-help
Is there a way to specify the wrangler file directory?
You fixed it for me 😭
11 replies
CDCloudflare Developers
Created by yinks on 7/25/2024 in #workers-help
Is there a way to specify the wrangler file directory?
oh yes it will!
11 replies
CDCloudflare Developers
Created by yinks on 7/25/2024 in #workers-help
Is there a way to specify the wrangler file directory?
the worker isn't in the root, it's in apps/frontend but since i'm using yarn workspaces, it knows the directory it is
11 replies
CDCloudflare Developers
Created by yinks on 7/25/2024 in #workers-help
Is there a way to specify the wrangler file directory?
I forgot to mention it's a turborepo monorepo
11 replies
CDCloudflare Developers
Created by yinks on 7/25/2024 in #workers-help
Is there a way to specify the wrangler file directory?
The build script has to be at the root for turbo to build dependent packages: npx turbo run build --filter=@frontend
11 replies
CDCloudflare Developers
Created by yinks on 9/13/2023 in #workers-help
Correct way to set CORS in Cloudflare Workers
I added this line at the top of the function
// handle CORS preflight request
if (request.method === 'OPTIONS') {
return new Response(null, {
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': '*',
'Access-Control-Allow-Credentials': 'true',
'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',
},
});
}
// handle CORS preflight request
if (request.method === 'OPTIONS') {
return new Response(null, {
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': '*',
'Access-Control-Allow-Credentials': 'true',
'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',
},
});
}
3 replies
CDCloudflare Developers
Created by yinks on 9/13/2023 in #workers-help
Correct way to set CORS in Cloudflare Workers
Thank you @Leo That worked
3 replies