Error 403 Forbidden on a subrequest to HTTP data source

Answer these questions to help the Community help you with Security questions.

What is the domain name?
d2r2.fr

Have you searched for an answer?
Yes.

Please share your search results url:

When you tested your domain, what were the results?
The subrequests to my data source fail with a 403 error Forbidden.

Describe the issue you are having:
The request to my backend works.
However, the subrequests that my backend makes to the source fail with a Forbidden 403 error, with a response.json() not valid JSON.
The webpage doesn’t have rendering issues, only the subrequest fails.
The subrequests work from localhost to the HTTP source, but fetch fails with a “fetch failed” response message to the HTTPS self-signed certificate source.
The application runs on NextJs 14, on the edge, with use of the NextJs Fetch API. Can’t define an Agent with a rejectUnauthorized:false (or didn’t find how).

What error message or number are you receiving?
403, Forbidden

What steps have you taken to resolve the issue?

  1. make a WAP rule to accept request from the source IP address
  2. use a another browser/private window.
  3. Disable the Browser Integrity Check

Was the site working with SSL prior to adding it to Cloudflare?
My website is simply served through Cloudflare, and deployed on Cloudflare Pages

What are the steps to reproduce the error:

  1. deploy a NextJs application to Cloudflare Pages
  2. create a site on Cloudflare
  3. in the application, make requests to backend that make subrequests to the same source.

Have you tried from another browser and/or incognito mode?
Yes

Please attach a screenshot of the error:
There is no error. The subrequests return a 403 error Forbidden. The same credentials for the subrequest work from localhost, fail only in Cloudflare.

Answer these questions to help the Community help you with Security questions.

What is the domain name?
d2r2.fr

Have you searched for an answer?
Yes

Please share your search results url:

When you tested your domain, what were the results?
Subrequests from my backend fail with a 403 error Forbidden

Describe the issue you are having:
my backend make the subrequests to the data source, but all fail with 403 Forbidden in Cloudflare.

What error message or number are you receiving?
403

What steps have you taken to resolve the issue?

  1. Change the SSL to Full
  2. Change HTTP parameters
  3. Make requests through Postman or localhost with the same credentials, and they work

Was the site working with SSL prior to adding it to Cloudflare?
No

What are the steps to reproduce the error:

  1. add a site that make subrequests to an HTTP source (or self-signed)

Have you tried from another browser and/or incognito mode?
Yes

Please attach a screenshot of the error:

Can you clear cache & try again and/or try from incognito mode? Site loads fine for me.

Site is loading. Requests fail.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.