Basic auth

For Workes & Pages, what is the name of the domain?

dreamspot-intern.pages.dev

What is the issue or error you’re encountering

everyone can see my login page

What are the steps to reproduce the issue?

just open dreamspot-intern.pages.dev
I would like to have a basic auth from server to prevent any users to see my login page
thanks

There is no built-in implementation of basic auth in Pages. You would have to implement it yourself with Functions/Workers. There is some sample code here, but if the purpose is just to authenticate yourself and/or people in your organization, you should look at Cloudflare Access instead.

1 Like

Hi, thanks for a quick response, but what I want init session like this in picture

i40west via Cloudflare Community <[email protected]> escreveu (quinta, 8/08/2024 à(s) 21:57):

That looks like what the Basic Auth in i40west’s example Worker would do.

Hi, good morning.

Can you show examples, I couldn’t find them in workers/pages.

Thanks
Carlos Vieira

sdayman via Cloudflare Community <[email protected]> escreveu (sexta, 9/08/2024 à(s) 17:26):

Hi there… Mr. sdayman
Sorry but I couldn’t found Basic Auth in i40west’s example Worker

can you send a picture of an example.

Or instruction guide?

thanks

Carlos Vieira <[email protected]> escreveu (segunda, 12/08/2024 à(s) 09:57):