Rui Saraiva
03/17/2022, 5:20 PMWalshy | Pages
03/17/2022, 5:21 PMRui Saraiva
03/17/2022, 5:22 PMDeleted User
03/18/2022, 2:32 AMthe-philociraptor
03/18/2022, 2:58 AM/functions/api/[[path]].js
. In this catchall, I am just doing a resolveOveride to recreate similar functionality to the page rules functionality.
export async function onRequest(context) {
// Contents of context object
const {
request, // same as existing Worker API
env, // same as existing Worker API
params, // if filename includes [id] or [[path]]
waitUntil, // same as ctx.waitUntil in existing Worker API
next, // used for middleware or to fetch assets
data, // arbitrary space for passing data between middlewares
} = context;
let config = {};
config.cf = {resolveOverride: "api.mydomain.com"};
return fetch(request, config);
}
api.mydomain.com
exists and it pointing to my api endpoint. I followed the instructions in the page rule doc and enabled the CDN on the record: https://canary.discord.com/channels/595317990191398933/910978223968518144/954020154226933801
When deploying to pages and hitting a valid path on the API, I get this error:
Error 1000 Ray ID: 6edaa8a262ae1877 • 2022-03-18 02:50:04 UTC
DNS points to prohibited IP
What happened?
You've requested a page on a website (dev.mydomain.com) that is on the Cloudflare network. Unfortunately, it is resolving to an IP address that is creating a conflict within Cloudflare's system.
What can I do?
If you are the owner of this website:
you should login to Cloudflare and change the DNS A records for dev.mydomain.com to resolve to a different IP address.
Anyone got any ideas what is going on?kian
03/18/2022, 10:01 AMdev.
DNS record to?simpson
03/18/2022, 11:32 AMsimpson
03/18/2022, 11:39 AMsimpson
03/18/2022, 11:48 AMJacob | Pages
03/18/2022, 11:55 AMlmtr0
03/18/2022, 12:13 PMlmtr0
03/18/2022, 12:15 PMlmtr0
03/18/2022, 12:16 PMlmtr0
03/18/2022, 12:16 PMlmtr0
03/18/2022, 12:28 PMthe-philociraptor
03/18/2022, 12:32 PMdev.
and api.
there.kian
03/18/2022, 12:33 PMkian
03/18/2022, 12:34 PMdev.
is pointing to an IP that conflicts with Cloudflare's networkkian
03/18/2022, 12:34 PMIsaac McFadyen | YYZ01
03/18/2022, 12:34 PM1.1.1.1
to discard any requests, but that's changed now.Isaac McFadyen | YYZ01
03/18/2022, 12:35 PM100::
the-philociraptor
03/18/2022, 12:39 PMthe-philociraptor
03/18/2022, 12:39 PMkian
03/18/2022, 12:40 PM100::
that Isaac mentioned) and let Cloudflare handle it from therekian
03/18/2022, 12:40 PMCNAME
itkian
03/18/2022, 12:40 PMdev.foo.bar
to foo.pages.dev
the-philociraptor
03/18/2022, 12:40 PMthe-philociraptor
03/18/2022, 12:40 PMthe-philociraptor
03/18/2022, 12:41 PMthe-philociraptor
03/18/2022, 12:46 PM