diff --git a/README.md b/README.md index 2178081..2bb3e08 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,10 @@ Lemma can be configured using environment variables. Here are the available conf - `LEMMA_WORKDIR`: Working directory for application data (default: "./data") - `LEMMA_STATIC_PATH`: Path to static files (default: "../app/dist") - `LEMMA_PORT`: Port to run the server on (default: "8080") -- `LEMMA_APP_URL`: Full URL where the application is hosted +- `LEMMA_DOMAIN`: Domain name where the application is hosted for cookie authentication - `LEMMA_CORS_ORIGINS`: Comma-separated list of allowed CORS origins -- `LEMMA_JWT_SIGNING_KEY`: Key used for signing JWT tokens (autogenerated if not set) +- `LEMMA_JWT_SIGNING_KEY`: Key used for signing JWT tokens +- `LEMMA_LOG_LEVEL`: Logging level (defaults to DEBUG in development mode, INFO in production) - `LEMMA_RATE_LIMIT_REQUESTS`: Number of allowed requests per window (default: 100) - `LEMMA_RATE_LIMIT_WINDOW`: Duration of the rate limit window (default: 15m) diff --git a/server/internal/app/config.go b/server/internal/app/config.go index 52ed8d3..3e0f49c 100644 --- a/server/internal/app/config.go +++ b/server/internal/app/config.go @@ -16,7 +16,6 @@ type Config struct { WorkDir string StaticPath string Port string - RootURL string Domain string CORSOrigins []string AdminEmail string @@ -90,10 +89,6 @@ func LoadConfig() (*Config, error) { config.Port = port } - if rootURL := os.Getenv("LEMMA_ROOT_URL"); rootURL != "" { - config.RootURL = rootURL - } - if domain := os.Getenv("LEMMA_DOMAIN"); domain != "" { config.Domain = domain } diff --git a/server/internal/app/config_test.go b/server/internal/app/config_test.go index ee9045c..c15ca9b 100644 --- a/server/internal/app/config_test.go +++ b/server/internal/app/config_test.go @@ -51,7 +51,6 @@ func TestLoad(t *testing.T) { "LEMMA_WORKDIR", "LEMMA_STATIC_PATH", "LEMMA_PORT", - "LEMMA_ROOT_URL", "LEMMA_DOMAIN", "LEMMA_CORS_ORIGINS", "LEMMA_ADMIN_EMAIL", @@ -127,7 +126,6 @@ func TestLoad(t *testing.T) { {"WorkDir", cfg.WorkDir, "/custom/work/dir"}, {"StaticPath", cfg.StaticPath, "/custom/static/path"}, {"Port", cfg.Port, "3000"}, - {"AppURL", cfg.RootURL, "http://localhost:3000"}, {"AdminEmail", cfg.AdminEmail, "admin@example.com"}, {"AdminPassword", cfg.AdminPassword, "password123"}, {"JWTSigningKey", cfg.JWTSigningKey, "secret-key"},