Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTTP Auth #60

Open
nahtnam opened this issue Sep 10, 2018 · 9 comments
Open

Add HTTP Auth #60

nahtnam opened this issue Sep 10, 2018 · 9 comments

Comments

@nahtnam
Copy link

nahtnam commented Sep 10, 2018

It would be nice if we could have and HTTP auth flag which we can define in the now.json. There are a few static pages that I have that I would like to hide behind a basic auth.

I believe the feature existed in previous versions of server but it is gone now.

cc @leo

@1cedsoda
Copy link

1cedsoda commented Oct 9, 2018

Yes, some kind of password protection would be nice.

@revolunet
Copy link

Before serve@7.0.0, one could use SERVE_USER and SERVE_PASSWORD in the now.json to password-protect static deployments.

Looks like this feature has gone for all zeit static hosted websites that relied on it ? (even premium) ?

@flawyte
Copy link

flawyte commented Jan 20, 2019

I need to add some kind of password protection to my deployments too.

As it isn't supported "natively" by now, maybe there's the possibility to use node.js or PHP (or any other server language) to send back the good auth headers so the browser asks the user for authentication, like with HTTP Basic Authentication. Then you'd have to check the credentials by yourself in your code.

EDIT: I've put together an example of how to implement Basic Auth manually using node.js : https://github.com/flawyte/now-basic-auth

@janhoogeveen
Copy link

Basic auth would be great while still developing applications that are not supposed to be public yet. Bonus points for adding an IP whitelist too serve as well.

@therebelrobot
Copy link

I submitted a PR to this and zeit/schemas to support this, hopefully it'll take 🤞

#96 and vercel/schemas#54

@bastiW
Copy link

bastiW commented Jan 15, 2020

Really would like to have this feature too, to protect my dev environment to be discovered and used accidentally

@arielaco
Copy link

Bumping this.

@warren-bank
Copy link

shameless self-promotion alert:
this feature is available in my @warren-bank/serve fork of serve

@chengjianhua
Copy link

Any progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants