0

I have created an ec2 windows instance where I have installed IIS. I have created a Cloudflare worker to download files using fetch api. But when I use await fetch('http://54.235.2.69/a.pdf', {cf:{cacheEverything: true}}), I'm getting 403 forbidden error. I'm able to download file directly using the server link but not using fetch api. Direct Server link for sample pdf Cloudflare worker link to download sample pdf

I have enable directory browsing and added mime type. Also checked the website folder have permissions to IUSR.

2
  • There are many reasons for this error, you need more information to analyze your problem, try using failed request tracing to see details about 403 error, this will generate detail log file, which will help you to identify the problem. Commented May 22, 2024 at 3:19
  • I solved this by binding a domain name. Instead of using ip address, now I use domain name and it is solved. Commented May 22, 2024 at 5:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.