[go: nahoru, domu]

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

Never expose API-key to browser #78

Closed
wants to merge 1 commit into from
Closed

Never expose API-key to browser #78

wants to merge 1 commit into from

Conversation

detecti1
Copy link
@detecti1 detecti1 commented Mar 8, 2023

Never expose API-key to browser, using server-side configuration instead when no user input is given.

using server-side configuration instead when no user input is given.
@GaiZhenbiao
Copy link
Owner

这样做,如果用户想要更换API-Key,就无法在网页上操作了。为了不替用户做这个选择,我提供了一个开关,用户可以自行选择是否需要隐藏该输入框。

@detecti1
Copy link
Author

实际上并不影响用户自行填写。提交的实现中输入框还在,用户也可以填写,只有当用户不填写时服务端才会使用默认的key,而服务端配置的key不会发送到客户端。
即使设置隐藏输入框,api-key的实际内容也是发送到浏览器了,用户可以轻松的通过把type="password" 改掉而看到实际key的内容

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

Successfully merging this pull request may close these issues.

None yet

2 participants