mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Hardcode keibi's prefix to /auth
This commit is contained in:
parent
b11b79ded0
commit
418eaa67f0
@ -1,9 +1,6 @@
|
||||
# vi: ft=sh
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
# http route prefix (will listen to $KEIBI_PREFIX/users for example)
|
||||
KEIBI_PREFIX=""
|
||||
|
||||
# path of the private key used to sign jwts. If this is empty, a new one will be generated on startup
|
||||
RSA_PRIVATE_KEY_PATH=""
|
||||
|
||||
|
@ -22,7 +22,6 @@ import (
|
||||
)
|
||||
|
||||
type Configuration struct {
|
||||
Prefix string
|
||||
JwtPrivateKey *rsa.PrivateKey
|
||||
JwtPublicKey *rsa.PublicKey
|
||||
JwtKid string
|
||||
@ -47,7 +46,6 @@ func LoadConfiguration(db *dbc.Queries) (*Configuration, error) {
|
||||
ret := DefaultConfig
|
||||
|
||||
ret.PublicUrl = os.Getenv("PUBLIC_URL")
|
||||
ret.Prefix = os.Getenv("KEIBI_PREFIX")
|
||||
|
||||
claims := os.Getenv("EXTRA_CLAIMS")
|
||||
if claims != "" {
|
||||
|
@ -228,8 +228,8 @@ func main() {
|
||||
}
|
||||
h.config = conf
|
||||
|
||||
g := e.Group(conf.Prefix)
|
||||
r := e.Group(conf.Prefix)
|
||||
g := e.Group("/auth")
|
||||
r := e.Group("/auth")
|
||||
r.Use(h.TokenToJwt)
|
||||
r.Use(echojwt.WithConfig(echojwt.Config{
|
||||
SigningMethod: "RS256",
|
||||
|
@ -66,8 +66,6 @@ services:
|
||||
condition: service_healthy
|
||||
env_file:
|
||||
- ./.env
|
||||
environment:
|
||||
- KEIBI_PREFIX=/auth
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.auth.rule=PathPrefix(`/auth/`)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user