Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator
This commit is contained in:
@@ -326,9 +326,19 @@ try
|
|||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
|
||||||
app.MapReverseProxy();
|
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
|
|
||||||
|
// Catch-all YARP proxy — only forward requests that are not swagger/scalar/openapi paths.
|
||||||
|
app.MapWhen(
|
||||||
|
ctx =>
|
||||||
|
{
|
||||||
|
var path = ctx.Request.Path.Value ?? string.Empty;
|
||||||
|
return !path.StartsWith("/swagger", StringComparison.OrdinalIgnoreCase) &&
|
||||||
|
!path.StartsWith("/scalar", StringComparison.OrdinalIgnoreCase) &&
|
||||||
|
!path.StartsWith("/openapi", StringComparison.OrdinalIgnoreCase);
|
||||||
|
},
|
||||||
|
branch => branch.UseRouting().UseEndpoints(e => e.MapReverseProxy()));
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Reference in New Issue
Block a user