Protect Internal Resources
When some documents are internal use only, you can enable protect mode for them.
What does protect mode do?
- Authentication based on HTTP Basic Authorization.
- User defines a list of authorized users along with their password.
- User defines a list of resources to be protected and individuals who can access.
To enable protect mode, you would need to create a file named
protect.ini and put it in same directory as your
Here is an example:
[user] user1 = 5F4DCC3B5AA765D61D8327DEB882CF99 user2 = xxx user3 = xxx [auth] howto/documentation = user1,user2,user3 howto/webhook = user1,user2 howto/templates = user1
User password must be MD5-encoded, and use comma (
,) to seperate multiple users.
Document URLs do not need
/docs/ prefix as you can tell.
Based on example file, there are three users are authorized, and three resources are protected:
user1has all access to three resources.
user2can only access
howto/webhook, and gets 403 when tries to access
user3can only access
howto/documentation, and gets 403 when tries to access
- Fail to authenticate will result in 401.