Commit d857747c by lizefeng

服务端配置跨域

parent b6801ac9
...@@ -59,10 +59,9 @@ namespace AutoTurnOver ...@@ -59,10 +59,9 @@ namespace AutoTurnOver
app.UseHttpsRedirection(); app.UseHttpsRedirection();
app.UseCors(builder => app.UseCors(builder =>
builder builder.AllowAnyOrigin()
.WithOrigins("http://ui.data.com") .AllowAnyMethod()
.WithHeaders("x-requested-with", "content-type") .AllowAnyHeader()
.WithMethods("GET", "POST", "PUT", "DELETE")
); );
app.UseMvc(routes => app.UseMvc(routes =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment