Feat: login page supports to hide the registration button through environment variables.
What problem does this PR solve?
注册功能无法关闭可能导致安全风险,通过环境变量控制注册功能的开启与关闭一定程度上可解决此问题
Appreciations!
ok changed
HIDE_SIGNUP=0
The login page cannot get the value of the environment variable defined in docker/.env through process.env.
Why can't we get the process.env.HIDE_SIGNUP value during testing?
How to accomplish that?
I have tested the code below and it works well with Docker:
const hide_signup = process.env.HIDE_SIGNUP === '1';
At 2025-03-13 10:53:03, "Kevin Hu" @.***> wrote:
Why can't we get the process.env.HIDE_SIGNUP value during testing? How to accomplish that?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
KevinHuSh left a comment (infiniflow/ragflow#5757)
Why can't we get the process.env.HIDE_SIGNUP value during testing? How to accomplish that?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
Although I am not a participant, I have a suggestion to be able to debug from src we can add HIDE_SIGNUP =1 here: https://github.com/infiniflow/ragflow/blob/main/web/.env
The environment variables are from the /ragflow/docker/.env file, and docker-compose.yml references this .env file, so it will not work without Docker. How to achieve this is not important. Adding HIDE_SIGNUP=1 in web/.env is a good idea without using Docker.
At 2025-03-13 12:24:35, "so95" @.***> wrote:
Although I am not a participant, I have a suggestion to be able to debug from src we can add HIDE_SIGNUP =1 here: https://github.com/infiniflow/ragflow/blob/main/web/.env
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
isthaison left a comment (infiniflow/ragflow#5757)
Although I am not a participant, I have a suggestion to be able to debug from src we can add HIDE_SIGNUP =1 here: https://github.com/infiniflow/ragflow/blob/main/web/.env
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
At 2025-03-13 13:03:11, "so95" @.***> wrote:
image.png (view on web)
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
isthaison left a comment (infiniflow/ragflow#5757)
image.png (view on web)
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
So, it's not feasible to disable signing-up only via envirement variable in the container, isn't it?
And there's no place to know for others how to disable it via adding variable in [/ragflow/blob/main/web/.env](https://github.com/infiniflow/ragflow/blob/main/web/.env).
This PR is gona close.
Thanks anyway.
I can use the .env to do it in the container Hope you find other way to hide the regisitation button.
At 2025-03-14 09:54:21, "Kevin Hu" @.***> wrote:
So, it's not feasible to disable signing-up only via envirement variable in the container, isn't it? And there's no place to know for others how to disable it via adding variable in /ragflow/blob/main/web/.env. This PR is gona close. Thanks anyway.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
KevinHuSh left a comment (infiniflow/ragflow#5757)
So, it's not feasible to disable signing-up only via envirement variable in the container, isn't it? And there's no place to know for others how to disable it via adding variable in /ragflow/blob/main/web/.env. This PR is gona close. Thanks anyway.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
https://github.com/hitechbeijing/ragflow/pull/1 I have changes a litle modified working on dev