services.AddCors(options =>
       {
                    options.AddPolicy("AnotherPolicy", builder =>
                    {
                        builder.AllowAnyHeader()
                               .AllowAnyMethod()
                               .AllowAnyOrigin()
                               .AllowCredentials()
                               .WithExposedHeaders("user"); // params string[]
                    });
        });

        [EnableCors("AnotherPolicy")]
        public async Task<string> Test()

相关文章:

  • 2022-12-23
  • 2021-09-23
  • 2021-04-20
  • 2021-06-06
  • 2022-12-23
  • 2021-04-03
  • 2021-11-27
  • 2021-12-19
猜你喜欢
  • 2021-10-13
  • 2022-12-23
  • 2022-02-15
  • 2021-06-10
  • 2021-12-23
  • 2021-08-18
  • 2022-12-23
相关资源
相似解决方案