No, you need to use https://github.com/cloudflare/next-on-pages
GitHub
CLI to build and develop Next.js apps for Cloudflare Pages - cloudflare/next-on-pages
How do I call the fetch on service A without having to manually specify the URL as it might changeWhen using the service binding the URL doesn't really "mean" anything in the normal fetch sense here, it just is passed verbatim to the other Worker in
request.url. It will still hit that worker even if you put something silly like http://dummy.how can I stop external requests from being able to hit project A directly?Disable the workers.dev subdomain for the Worker (
workers_dev = false in wrangler.toml) and don't define any routes entries for it.

(Reason: CORS preflight response did not succeed). Status code: 500.This indicates the issue is not with the headers, but rather the fact that the request is returning 500 instead of 200. Most likely a 500 in this context means the Worker thew an exception, check the log for that error to see why: https://developers.cloudflare.com/workers/observability/logging/
no-transform on the request, it still doesn't work..walshy@

request.urlhttp://dummyworkers_dev = falseroutesCross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at <ur>. (Reason: CORS preflight response did not succeed). Status code: 500. 2no-transformwalshy@return new Response(JSON.stringify({ url: uploadUrl }), {
status: 200,
statusText: 'OK',
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET,HEAD,POST,OPTIONS",
"Access-Control-Max-Age": "86400",
"Access-Control-Allow-Headers": "Content-Type"
}
});