refactor: 处理 APISIX key 中可能包含的无法使用的字符

This commit is contained in:
xuwei-fit2cloud 2024-06-19 09:26:48 +08:00
parent f699e8a3db
commit fe01f55a3d

View File

@ -67,7 +67,7 @@ function _check_apisix_init() {
function _prepare_apisix() { function _prepare_apisix() {
if [[ -z $DE_APISIX_KEY ]];then if [[ -z $DE_APISIX_KEY ]];then
need_init_apisix=true need_init_apisix=true
DE_APISIX_KEY=$(head -c 32 /dev/urandom | base64) DE_APISIX_KEY=$(head -c 32 /dev/urandom | base64 | sed 's#/#+#g')
export DE_APISIX_KEY=$DE_APISIX_KEY export DE_APISIX_KEY=$DE_APISIX_KEY
cd $DE_RUNNING_BASE cd $DE_RUNNING_BASE
env | grep DE_ >.env env | grep DE_ >.env