Access Forbidden in Cloudflare workers

cname

#1

Hi All,
I am new to cloudflare. For one of my requirement I wanted to share the content url in secure mode. So, I planned to have the cloud flare workers. I tried with the samples provided. But, when I tried to run I had forbidden error. Even when i dig the promises, it is pending and the responses are some time pending and some time resolved.
My question is, do I need to setup any permission to do that ? or am I missing something.

Need your help.

Thanks and Regards,
Shanmugam


#2

Hi @shanmugam,

I’m not 100% sure I follow what the problem and goal is?

Can you post an example and expected outcome?

Thanks!


#3

Thanks for your response.

I am trying to use the default encryption and decryption mentioned in the cloudflare worker site(https://developers.cloudflare.com/workers/recipes/signed-requests/) for one of my application. Also, I have added the pattern in order to work with the worker.
But, still I am not able to access the content. Kindly check the attachment for reference.

Thanks
Shan


#4

On line 13, add the await like:

if (!url.pathname.startsWith('verify')) {
  return await fetch(request)
}

#5

[email protected]


#6

Thanks all for your responses.

Thanks
Shanmugam