mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-07-09 12:27:49 +02:00
open source Notesnook API
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
namespace Microsoft.Extensions.DependencyInjection.CorsServiceCollectionExtensions
|
||||
{
|
||||
public static class ServiceCollectionServiceExtensions
|
||||
{
|
||||
public static IServiceCollection AddCors(this IServiceCollection services)
|
||||
{
|
||||
services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy("notesnook", (b) =>
|
||||
{
|
||||
#if DEBUG
|
||||
b.AllowAnyOrigin();
|
||||
#else
|
||||
b.WithOrigins("http://localhost:3000", "http://192.168.10.29:3000", "https://app.notesnook.com", "https://beta.notesnook.com", "https://budi.streetwriters.co", "http://localhost:9876");
|
||||
#endif
|
||||
b.AllowAnyMethod()
|
||||
.AllowAnyHeader()
|
||||
.AllowCredentials();
|
||||
});
|
||||
});
|
||||
return services;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user