🐛 Fix websocket cannot pass auth
This commit is contained in:
parent
729409618b
commit
eacfd7296e
@ -17,6 +17,9 @@ func authMiddleware(c *fiber.Ctx) error {
|
||||
tk := strings.Replace(header, "Bearer", "", 1)
|
||||
token = strings.TrimSpace(tk)
|
||||
}
|
||||
if query := c.Query("tk"); len(query) > 0 {
|
||||
token = strings.TrimSpace(query)
|
||||
}
|
||||
|
||||
c.Locals("token", token)
|
||||
|
||||
|
@ -10,14 +10,14 @@ secret = "LtTjzAGFLshwXhN4ZD4nG5KlMv1MWcsvfv03TSZYnT1VhiAnLIZFTnHUwR0XhGgi"
|
||||
content = "uploads"
|
||||
|
||||
[debug]
|
||||
database = true
|
||||
database = false
|
||||
print_routes = false
|
||||
|
||||
[identity]
|
||||
client_id = "solarecho"
|
||||
client_secret = "Z9k9AFTj^p"
|
||||
endpoint = "http://localhost:8444"
|
||||
grpc_endpoint = "127.0.0.1:7444"
|
||||
endpoint = "https://id.solsynth.dev"
|
||||
grpc_endpoint = "id.solsynth.dev:7444"
|
||||
|
||||
[mailer]
|
||||
name = "Alphabot <alphabot@smartsheep.studio>"
|
||||
|
Loading…
Reference in New Issue
Block a user