Secret key environment variable no longer needed

This commit is contained in:
ditatompel 2024-05-23 03:57:29 +07:00
parent 253230dc5a
commit 2270fe4deb
No known key found for this signature in database
GPG key ID: 31D3D06D77950979
2 changed files with 5 additions and 4 deletions

View file

@ -11,14 +11,15 @@ TOR_SOCKS="127.0.0.1:9050"
# Server Config
# #############
SECRET_KEY="" # must be 32 char length, use `openssl rand -base64 32` to generate random secret
# Fiber Config
APP_PREFORK=true
APP_HOST="127.0.0.1"
APP_PORT=18090
APP_PROXY_HEADER="X-Real-Ip" # CF-Connecting-IP
APP_ALLOW_ORIGIN="http://localhost:5173,http://127.0.0.1:5173,https://ditatompel.com"
# DB settings:
#DB settings:
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=root

View file

@ -9,13 +9,14 @@ import (
type App struct {
// general config
LogLevel string
// configuration for server
Prefork bool
Host string
Port int
ProxyHeader string
AllowOrigin string
SecretKey string
// configuration for prober (client)
ServerEndpoint string
ApiKey string
@ -50,7 +51,6 @@ func LoadApp() {
app.Prefork, _ = strconv.ParseBool(os.Getenv("APP_PREFORK"))
app.ProxyHeader = os.Getenv("APP_PROXY_HEADER")
app.AllowOrigin = os.Getenv("APP_ALLOW_ORIGIN")
app.SecretKey = os.Getenv("SECRET_KEY")
// prober configuration
app.ServerEndpoint = os.Getenv("SERVER_ENDPOINT")