feat: add admin apis
This commit is contained in:
@@ -66,6 +66,11 @@ type Config struct {
|
||||
// Frontend
|
||||
FrontendURL string // for CORS + reset/verify links in emails
|
||||
|
||||
// AdminURL is the admin panel's origin. When set it's added to the CORS
|
||||
// allow-list (the admin app is a separate origin from FrontendURL). Empty
|
||||
// disables admin-origin CORS (only the main frontend is allowed).
|
||||
AdminURL string
|
||||
|
||||
// RevalidateSecret authenticates BFF→frontend on-demand cache
|
||||
// revalidation pings (POST /api/revalidate). Empty disables the pings.
|
||||
RevalidateSecret string
|
||||
@@ -152,6 +157,7 @@ func Load() (*Config, error) {
|
||||
CookieSecure: getEnvBool("COOKIE_SECURE", false),
|
||||
|
||||
FrontendURL: getEnv("FRONTEND_URL", "http://localhost:3000"),
|
||||
AdminURL: getEnv("ADMIN_URL", ""),
|
||||
RevalidateSecret: getEnv("REVALIDATE_SECRET", ""),
|
||||
|
||||
BFFPublicURL: getEnv("BFF_PUBLIC_URL", "http://localhost:8080"),
|
||||
|
||||
Reference in New Issue
Block a user