Add routes to your vercel.json that enforces password authentication
Project description
vercel-pw-protection
This plugin overwrites your vercel.json
's routes
attribute so that your deployment is password protected.
Login on demo: https://mkdocs-vercel-pw-plugin.vercel.app/#Monkey123!
This plugin is an implementation of the cookie method from https://github.com/six-two/mkdocs-vercel-basic-auth-example
.
Prerequesites:
You have created a vercel.json
file and it does not have any existing routes
.
Usage
Install the package via pip:
pip install @TODO
Then add the plugin to your mkdocs.yml
:
plugins:
- vercel_pw:
cookie_name: JSESSIONID
password: Monkey123!
restrict_to_domain: mkdocs-pw-protection.vercel.app
vercel_json_path: ../vercel.json
Optional:
You can link to /logout.html
.
You need to run a successful build (mkdocs build
or mkdocs serve
) after changing the config before pushing your changes to Vercel.
This is because the vercel.json
is only updated after a build is performed.
Customization
By default the "login" page mimics the Vercel deployment not found page.
This serves as a small security by obscurity measure.
Of course you can also provide your own docs/deployment_not_found.html
that instead shows a login formular or something like that.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mkdocs-vercel-pw-plugin-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb9c2542a089b0953839fc1177e5869687f7ec6f49d0cf5369ed993560676196 |
|
MD5 | a352bc49df64ffcd172d5003739d0023 |
|
BLAKE2b-256 | 37fbfba91a821636940a0e214aeef70918e3e59a97c724a5133d623dd4a89bf9 |
Hashes for mkdocs_vercel_pw_plugin-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84a9ab3e3c50af4d1e74a57046ddfc26a0e1ec335c0f615945956e02cd1bf813 |
|
MD5 | c4251ef6b168670bd2c2c47a7bd64fd5 |
|
BLAKE2b-256 | 1da6cc46e72b2ce28b26ddfa0bf39a0b4d11b638a740c7a39923c0d91412053c |