Send CORS allowed headers in API response (#114)

Sends Access-Control-Allow-Headers Content-Type and Authorization in the API response headers
This commit is contained in:
Bella | Nightshade 2019-07-17 21:09:07 +09:30 committed by Astrid
parent a188c64a0e
commit 1c48cb2fc7

View File

@ -49,7 +49,7 @@ namespace PluralKit.API
}
//app.UseHttpsRedirection();
app.UseCors(opts => opts.AllowAnyMethod().AllowAnyOrigin());
app.UseCors(opts => opts.AllowAnyMethod().AllowAnyOrigin().WithHeaders("Content-Type", "Authorization"));
app.UseMiddleware<TokenAuthService>();
app.UseMvc();
}