Introduction
The Password Protection option of CDN Static, CDN Static Push and CDN HTTP Live services gives you an option to protect your CDN content.
How to enable Password Protection
- Go to the Services/Settings page.
- Set Password Protection to Enabled.
- Specify username:password combinations - one per line, for example john:UkxGhjL5s.
- (Optional) specify the HTML code which will be displayed to unauthorized visitors.
How to access protected content using curl
There are two ways to authenticate with your CDN content using curl:
- Using the -u option: curl -u user:pass https://cdn.mycompany.com
- Including credentials in the URL: curl https://user:pass@cdn.mycompany.com