Skip to content

Commit

Permalink
Add diagnostics for issues with auth when ssr request (#916)
Browse files Browse the repository at this point in the history
  • Loading branch information
SapiensAnatis authored Jun 30, 2024
1 parent 5cec53c commit 403f2b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DragaliaAPI/DragaliaAPI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@
cors.WithOrigins(allowedOrigins).AllowCredentials().AllowAnyHeader().AllowAnyMethod()
);
applicationBuilder.UseRouting();
applicationBuilder.UseSerilogRequestLogging();
#pragma warning disable ASP0001
applicationBuilder.UseAuthorization();
#pragma warning restore ASP0001
applicationBuilder.UseMiddleware<LogContextMiddleware>();
applicationBuilder.UseSerilogRequestLogging();
applicationBuilder.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
Expand Down
1 change: 1 addition & 0 deletions Website/src/routes/(main)/account/+layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const load: LayoutLoad = async ({ fetch, url }) => {

if (!response.ok) {
if (response.status >= 400 && response.status <= 499) {
console.log(`/user/me response was not successful: ${response.status}`);
redirect(303, `/unauthorized/${response.status}`);
} else {
throw new Error(`/user/me error: HTTP ${response.status}`);
Expand Down

0 comments on commit 403f2b7

Please sign in to comment.