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