如何防止公众进入非生产阶段? [英] How do I prevent the public from accessing non production stages?

查看:83
本文介绍了如何防止公众进入非生产阶段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此处询问了此问题几年前,但没有答案.看来这应该是可能的,但是我在Heroku文档或网络上的其他地方都找不到任何东西.

This question was asked here a few years ago, but doesn't have an answer. It seems like this should be possible, but I haven't found anything in the Heroku documentation nor elsewhere on the web.

理想情况下,我想在应用程序管道的非生产阶段要求输入密码.我该怎么办?

Ideally, I'd like to require a password to non-production stages in my app's pipeline. How can I do this?

推荐答案

Heroku express- basic-auth ),您可以使用

Heroku recommends to handle such differences on the codebase side. HTTP authentication is very easy to set up on most servers (only two lines with Express + express-basic-auth) and you can turn it on or off depending on whether the app is running in the staging environment or the development environment with environment variables.

这篇关于如何防止公众进入非生产阶段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆