Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议加个登录验证页面 #3

Closed
jialezi666 opened this issue Nov 20, 2018 · 4 comments
Closed

建议加个登录验证页面 #3

jialezi666 opened this issue Nov 20, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@jialezi666
Copy link

建议加个登录验证页面,面板直接暴露出来有点危险

@qfdk
Copy link
Owner

qfdk commented Nov 20, 2018

您好暴漏出来为了方便管理,如果涉及到认证后面会涉及到密码修改,这样会多出一个数据库的操作。这个面包主要是为了方便快捷管理开发。如果想加密码可以考虑 nginx 反代加密码 :)

@qfdk qfdk added the enhancement New feature or request label Nov 20, 2018
@qfdk
Copy link
Owner

qfdk commented Dec 6, 2018

@kmm996
参照nginx反向代理,添加认证

生成密码

mkdir -p /usr/local/nginx/conf/passwd
htpasswd -c -b /usr/local/nginx/conf/passwd/docker.passwd user password
## 或者
echo "用户名:$(openssl passwd -crypt 密码)" >>/usr/local/nginx/conf/passwd/docker.passwd

Nginx 配置参考

server {
    listen 80;
    auth_basic "Restricted Access";
    auth_basic_user_file /usr/local/nginx/conf/passwd/docker.passwd;
    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade; 
    }
}

有问题请回复,三天后将关闭issues

@qfdk qfdk closed this as completed Dec 9, 2018
@xmmaster
Copy link

反代加密码 好办法~

@qfdk
Copy link
Owner

qfdk commented Oct 21, 2020

@jialezi666 @xmmaster 添加了一个简单的验证页面

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants