The 'Access-Control-Allow-Origin' header contains multiple values

Apr 1 2021 11:06 PM
I am facing this problem when i send any request to any method 
 
here is my startup.ts
 
public void Configuration(IAppBuilder app)
{
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=316888
HttpConfiguration config = new HttpConfiguration();
app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
EnableCorsAttribute cors = new EnableCorsAttribute("*", "*", "*");
var provider = new Myauthenticationserverprovider();
OAuthAuthorizationServerOptions options = new OAuthAuthorizationServerOptions
{
AllowInsecureHttp = true,
TokenEndpointPath = new PathString("/token"),
AccessTokenExpireTimeSpan = TimeSpan.FromDays(1),
Provider=provider
};
app.UseOAuthAuthorizationServer(options);
app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions());
config.EnableCors(cors);
WebApiConfig.Register(config);
}
 
i am able to access the token but problem with passing token in header 

Answers (1)