open source Notesnook API

This commit is contained in:
Abdullah Atta
2022-12-28 16:20:25 +05:00
parent cf406454cd
commit d2217adce7
85 changed files with 4137 additions and 0 deletions
@@ -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;
}
}
}