Uses local redirect for authorization.
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s

Changes from `RedirectToRoute` to `LocalRedirect` for the
authorization endpoint to improve security and ensure the
redirect stays within the application's domain.
This commit is contained in:
2025-08-17 12:11:27 +02:00
parent f049d023c9
commit 04a708216a

View File

@@ -238,7 +238,7 @@ if (app.Environment.IsDevelopment())
logger.LogCritical("User has access_token: {access_token} and refresh_token: {refresh_token}", access_token, refresh_token);
if (String.IsNullOrEmpty(access_token))
return Results.RedirectToRoute("/Authorize");
return Results.LocalRedirect("/Authorize");
HttpClient client = httpClientFactory.CreateClient();
client.BaseAddress = new Uri("tesla_command_proxy");