How to password protect staging environment?

I’m not sure exactly how to achieve that, but maybe someone else will jump in if they have some ideas. It should be possible with some tweaks to the nginx config.

As a workaround, and since this is a staging server, could you just disable the CDN? If you use the same domain for assets, they will automatically be sent the authentication header so you won’t need to enter the auth password again.