Skip to content

🔐▲ A simple basic HTTP Auth Proxy for Vercel, ideal for adding simple password protection to staging applications.

Notifications You must be signed in to change notification settings

hallstain/simple-basic-http-auth-proxy-vercel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-basic-http-auth-proxy-vercel

🔐▲ A simple basic HTTP Auth Proxy for Vercel, ideal for adding simple password protection to staging applications.

This project uses node-http-proxy inside a serverless function to add basic password protection to ORIGIN site via HTTP Auth, requiring no code change to the ORIGIN deployment. This is designed to add simple password protection to deployments during the UAT stage.

Getting Started

  1. Deploying this project to Vercel Now
    Deploy with Vercel

  2. Adding the following ENV variables for Production:

  • ORIGIN: The URL of your stage deployment, best to point it to a custom domain assigned to the UAT branch.
  • USERNAME: The username required to login.
  • PASSWORD: The password required to login.
  1. Redeploy app using the updated ENV variables.

Local Usage

  1. Run yarn install to install the require packages.
  2. Update .env file with values required.
  3. Run now dev.

Demo

The deployment at https://simple-basic-http-auth-proxy-vercel.now.sh adds password protection around Google search.

Username: williamli

Password: password

About

🔐▲ A simple basic HTTP Auth Proxy for Vercel, ideal for adding simple password protection to staging applications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%