mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2024-11-25 22:42:51 +01:00
Compare commits
No commits in common. "176a81e05551c7643f180fab02ce2c793b737e8d" and "33f5ab7cceef920fc81b951a591dd523fc76d67c" have entirely different histories.
176a81e055
...
33f5ab7cce
@ -9,13 +9,6 @@ using Microsoft.Extensions.Hosting;
|
|||||||
|
|
||||||
namespace DHT.Server.Service {
|
namespace DHT.Server.Service {
|
||||||
sealed class Startup {
|
sealed class Startup {
|
||||||
private static readonly string[] AllowedOrigins = {
|
|
||||||
"https://discord.com",
|
|
||||||
"https://ptb.discord.com",
|
|
||||||
"https://canary.discord.com",
|
|
||||||
"https://discordapp.com"
|
|
||||||
};
|
|
||||||
|
|
||||||
public void ConfigureServices(IServiceCollection services) {
|
public void ConfigureServices(IServiceCollection services) {
|
||||||
services.Configure<JsonOptions>(static options => {
|
services.Configure<JsonOptions>(static options => {
|
||||||
options.SerializerOptions.NumberHandling = JsonNumberHandling.Strict;
|
options.SerializerOptions.NumberHandling = JsonNumberHandling.Strict;
|
||||||
@ -23,7 +16,7 @@ namespace DHT.Server.Service {
|
|||||||
|
|
||||||
services.AddCors(static cors => {
|
services.AddCors(static cors => {
|
||||||
cors.AddDefaultPolicy(static builder => {
|
cors.AddDefaultPolicy(static builder => {
|
||||||
builder.WithOrigins(AllowedOrigins).AllowCredentials().AllowAnyMethod().AllowAnyHeader();
|
builder.WithOrigins("https://discord.com", "https://discordapp.com").AllowCredentials().AllowAnyMethod().AllowAnyHeader();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user