forked from baron/baron-sso
callback 검증 보강. seed-tenant 추가보강
This commit is contained in:
@@ -3,6 +3,19 @@ set -eu
|
||||
|
||||
app_env="$(printf '%s' "${APP_ENV:-development}" | tr '[:upper:]' '[:lower:]')"
|
||||
|
||||
if [ -z "${VITE_DEVFRONT_PUBLIC_URL:-}" ] && [ -n "${DEVFRONT_URL:-}" ]; then
|
||||
export VITE_DEVFRONT_PUBLIC_URL="$DEVFRONT_URL"
|
||||
fi
|
||||
|
||||
if [ -z "${VITE_DEVFRONT_PUBLIC_URL:-}" ] && [ -n "${DEVFRONT_CALLBACK_URLS:-}" ]; then
|
||||
first_devfront_callback="${DEVFRONT_CALLBACK_URLS%%,*}"
|
||||
case "$first_devfront_callback" in
|
||||
http://*/auth/callback | https://*/auth/callback)
|
||||
export VITE_DEVFRONT_PUBLIC_URL="${first_devfront_callback%/auth/callback}"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case "$app_env" in
|
||||
production|prod|stage|staging)
|
||||
mode="production"
|
||||
@@ -12,6 +25,11 @@ case "$app_env" in
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "${1:-}" = "--print-public-url" ]; then
|
||||
printf '%s\n' "${VITE_DEVFRONT_PUBLIC_URL:-}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1:-}" = "--print-mode" ]; then
|
||||
printf '%s\n' "$mode"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user