forked from tsai/eShopOnAbp
29 changed files with 172 additions and 23 deletions
@ -0,0 +1,9 @@ |
|||
const originalFetch = window.fetch; |
|||
|
|||
window.fetch = function (input, init) { |
|||
if (init !== undefined && init.headers['RequestVerificationToken'] !== undefined) { |
|||
delete init.headers['RequestVerificationToken']; |
|||
} |
|||
|
|||
return originalFetch.apply(this, arguments); |
|||
}; |
|||
@ -0,0 +1,9 @@ |
|||
const originalFetch = window.fetch; |
|||
|
|||
window.fetch = function (input, init) { |
|||
if (init !== undefined && init.headers['RequestVerificationToken'] !== undefined) { |
|||
delete init.headers['RequestVerificationToken']; |
|||
} |
|||
|
|||
return originalFetch.apply(this, arguments); |
|||
}; |
|||
@ -0,0 +1,9 @@ |
|||
const originalFetch = window.fetch; |
|||
|
|||
window.fetch = function (input, init) { |
|||
if (init !== undefined && init.headers['RequestVerificationToken'] !== undefined) { |
|||
delete init.headers['RequestVerificationToken']; |
|||
} |
|||
|
|||
return originalFetch.apply(this, arguments); |
|||
}; |
|||
@ -0,0 +1,9 @@ |
|||
const originalFetch = window.fetch; |
|||
|
|||
window.fetch = function (input, init) { |
|||
if (init !== undefined && init.headers['RequestVerificationToken'] !== undefined) { |
|||
delete init.headers['RequestVerificationToken']; |
|||
} |
|||
|
|||
return originalFetch.apply(this, arguments); |
|||
}; |
|||
@ -0,0 +1,9 @@ |
|||
const originalFetch = window.fetch; |
|||
|
|||
window.fetch = function (input, init) { |
|||
if (init !== undefined && init.headers['RequestVerificationToken'] !== undefined) { |
|||
delete init.headers['RequestVerificationToken']; |
|||
} |
|||
|
|||
return originalFetch.apply(this, arguments); |
|||
}; |
|||
@ -0,0 +1,9 @@ |
|||
const originalFetch = window.fetch; |
|||
|
|||
window.fetch = function (input, init) { |
|||
if (init !== undefined && init.headers['RequestVerificationToken'] !== undefined) { |
|||
delete init.headers['RequestVerificationToken']; |
|||
} |
|||
|
|||
return originalFetch.apply(this, arguments); |
|||
}; |
|||
@ -0,0 +1,9 @@ |
|||
const originalFetch = window.fetch; |
|||
|
|||
window.fetch = function (input, init) { |
|||
if (init !== undefined && init.headers['RequestVerificationToken'] !== undefined) { |
|||
delete init.headers['RequestVerificationToken']; |
|||
} |
|||
|
|||
return originalFetch.apply(this, arguments); |
|||
}; |
|||
@ -0,0 +1,9 @@ |
|||
const originalFetch = window.fetch; |
|||
|
|||
window.fetch = function (input, init) { |
|||
if (init !== undefined && init.headers['RequestVerificationToken'] !== undefined) { |
|||
delete init.headers['RequestVerificationToken']; |
|||
} |
|||
|
|||
return originalFetch.apply(this, arguments); |
|||
}; |
|||
@ -0,0 +1,9 @@ |
|||
const originalFetch = window.fetch; |
|||
|
|||
window.fetch = function (input, init) { |
|||
if (init !== undefined && init.headers['RequestVerificationToken'] !== undefined) { |
|||
delete init.headers['RequestVerificationToken']; |
|||
} |
|||
|
|||
return originalFetch.apply(this, arguments); |
|||
}; |
|||
@ -0,0 +1,27 @@ |
|||
using System; |
|||
using Microsoft.AspNetCore.Builder; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Swashbuckle.AspNetCore.SwaggerUI; |
|||
using Volo.Abp.Swashbuckle; |
|||
|
|||
namespace EShopOnAbp.Shared.Hosting.AspNetCore; |
|||
|
|||
public static class AbpSwaggerUIBuilderExtensions |
|||
{ |
|||
public static IApplicationBuilder UseAbpSwaggerWithCustomScriptUI( |
|||
this IApplicationBuilder app, |
|||
Action<SwaggerUIOptions>? setupAction = null) |
|||
{ |
|||
var resolver = app.ApplicationServices.GetService<ISwaggerHtmlResolver>(); |
|||
|
|||
return app.UseSwaggerUI(options => |
|||
{ |
|||
options.InjectJavascript("ui/abp.js"); |
|||
options.InjectJavascript("ui/abp.swagger.js"); |
|||
options.InjectJavascript("ui/requestinterceptor.js"); |
|||
options.IndexStream = () => resolver?.Resolver(); |
|||
|
|||
setupAction?.Invoke(options); |
|||
}); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue