fix: JWT-валидация через lk-api-gateway PROD + User-Agent в PingNubesAPI
This commit is contained in:
+1
-1
@@ -65,7 +65,7 @@ type Handler struct {
|
||||
func NewHandler(store *tenant.TenantStore, adminToken string) *Handler {
|
||||
nubesEndpoint := os.Getenv("NUBES_ENDPOINT")
|
||||
if nubesEndpoint == "" {
|
||||
nubesEndpoint = "https://deck-api-test.ngcloud.ru/api/v1"
|
||||
nubesEndpoint = "https://lk-api-gateway.ngcloud.ru/api/v1/svc"
|
||||
}
|
||||
return &Handler{store: store, adminToken: adminToken, nubesEndpoint: nubesEndpoint}
|
||||
}
|
||||
|
||||
@@ -84,6 +84,7 @@ func PingNubesAPI(ctx context.Context, endpoint, token string) error {
|
||||
return fmt.Errorf("build nubes ping request: %w", err)
|
||||
}
|
||||
req.Header.Set("Authorization", "Bearer "+token)
|
||||
req.Header.Set("User-Agent", "Mozilla/5.0")
|
||||
|
||||
client := &http.Client{Timeout: 10 * time.Second}
|
||||
resp, err := client.Do(req)
|
||||
|
||||
Reference in New Issue
Block a user