updates
parent
949bfcf38f
commit
9892c8d2d9
19
Program.cs
19
Program.cs
|
|
@ -1,7 +1,26 @@
|
|||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using Microsoft.AspNetCore.ResponseCompression;
|
||||
using System.IO.Compression;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Services.AddResponseCompression(options =>
|
||||
{
|
||||
options.EnableForHttps = true;
|
||||
options.Providers.Add<BrotliCompressionProvider>();
|
||||
options.Providers.Add<GzipCompressionProvider>();
|
||||
});
|
||||
|
||||
builder.Services.Configure<BrotliCompressionProviderOptions>(options =>
|
||||
{
|
||||
options.Level = CompressionLevel.Fastest;
|
||||
});
|
||||
|
||||
builder.Services.Configure<GzipCompressionProviderOptions>(options =>
|
||||
{
|
||||
options.Level = CompressionLevel.SmallestSize;
|
||||
});
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllersWithViews();
|
||||
builder.Services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ $(document).ready(function () {
|
|||
|
||||
}
|
||||
|
||||
if (kolMedia_url22.indexOf("youtube") >= 0) {
|
||||
if (kolMedia_url22.indexOf("youtube") < 0) {
|
||||
err_msg += kolMedia_url22 + " 此Youtube網址有誤\n";
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue