Added useless origin to cors
This commit is contained in:
parent
9ff5a7fec8
commit
05aab1bfa4
@ -166,7 +166,23 @@ namespace ManagerService
|
|||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
app.UseCors("AllowAll");
|
//app.UseCors("AllowAll");
|
||||||
|
|
||||||
|
app.UseCors(
|
||||||
|
#if DEBUG
|
||||||
|
options => options
|
||||||
|
.SetIsOriginAllowed(origin => string.IsNullOrEmpty(origin) || origin == "http://localhost:8081")
|
||||||
|
.AllowAnyMethod()
|
||||||
|
.AllowAnyHeader()
|
||||||
|
.AllowCredentials()
|
||||||
|
#else
|
||||||
|
options => options
|
||||||
|
.SetIsOriginAllowed(origin => string.IsNullOrEmpty(origin) || origin == "https://manager.myinfomate.be")
|
||||||
|
.AllowAnyMethod()
|
||||||
|
.AllowAnyHeader()
|
||||||
|
.AllowCredentials()
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
|
||||||
app.UseEndpoints(endpoints =>
|
app.UseEndpoints(endpoints =>
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user