Commit d857747c by lizefeng

服务端配置跨域

parent b6801ac9
......@@ -59,10 +59,9 @@ namespace AutoTurnOver
app.UseHttpsRedirection();
app.UseCors(builder =>
builder
.WithOrigins("http://ui.data.com")
.WithHeaders("x-requested-with", "content-type")
.WithMethods("GET", "POST", "PUT", "DELETE")
builder.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader()
);
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