Often you might want to prevent the general public from accessing your project, particularly if it's work-in-progress. To allow that, Servd provides the option to provide enable "HTTP Basic Authentication" a.k.a. basic auth, which is supported by nearly all browsers. By default, basic auth is enabled on staging.
Toggling Basic Auth
Navigate to your production or staging settings page, depending on which environment you want to enable basic auth on.
Scroll down to the "Basic Auth" section.
Flick the slider in the right hand corner to enable Basic Auth.
Sync your project to deploy the change.
Copy your username and password details from on your project's overview page.
โAccess one of your project URLs for your chosen environment. You should now see a basic auth prompt asking for a username and password.
Submit the username and password, and you're in!
Updating Basic Auth Credentials
If you'd like to update the Basic Auth username and password, follow these steps:
Navigate to your production or staging settings page, depending on which environment you're looking to update.
Scroll down to the "Basic Auth" section.
Update the Username and/or Password.
If Basic Auth is disabled, flip the toggle switch to reveal the Username and Password fields.
Click the "Save" button.
Sync your project to deploy the change.