mirror of
https://github.com/nsnail/IGeekFan.AspNetCore.Knife4jUI.git
synced 2025-04-16 23:52:49 +08:00
#26 fix RoutePrefix nginx代理路径无效的问题
This commit is contained in:
parent
1e9fb7d195
commit
99fd092b24
@ -45,6 +45,7 @@ namespace IGeekFan.AspNetCore.Knife4jUI
|
|||||||
|
|
||||||
public async Task Invoke(HttpContext httpContext)
|
public async Task Invoke(HttpContext httpContext)
|
||||||
{
|
{
|
||||||
|
|
||||||
var httpMethod = httpContext.Request.Method;
|
var httpMethod = httpContext.Request.Method;
|
||||||
var path = httpContext.Request.Path.Value;
|
var path = httpContext.Request.Path.Value;
|
||||||
|
|
||||||
@ -66,7 +67,7 @@ namespace IGeekFan.AspNetCore.Knife4jUI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (httpMethod == "GET" && Regex.IsMatch(path, $"^/swagger-resources$"))
|
if (httpMethod == "GET" && Regex.IsMatch(path, $"/swagger-resources$"))
|
||||||
{
|
{
|
||||||
await RespondWithConfig(httpContext.Response);
|
await RespondWithConfig(httpContext.Response);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user