skip to Main Content

HTTP Error 400. The request hostname is invalid. On IIS when using `AllowedHosts` appsettings property – Asp.net

I get the error HTTP Error 400. The request hostname is invalid. on swagger when configuring CORS using the AllowedHost property. var origins = Configuration["AllowedHosts"].Split(";"); services.AddCors(options => { options.AddDefaultPolicy(builder => { builder.WithOrigins(origins) .AllowAnyHeader() .AllowAnyMethod(); }); }); But if I use…

VIEW QUESTION
Back To Top
Search