Skip to content

Instantly share code, notes, and snippets.

@brianmed
Last active July 31, 2021 02:23
Show Gist options
  • Save brianmed/5f4bc6882191f15b533901adbc540fa8 to your computer and use it in GitHub Desktop.
Save brianmed/5f4bc6882191f15b533901adbc540fa8 to your computer and use it in GitHub Desktop.
Some Core stuff
services.AddCors(options =>
{
options.AddPolicy(
"default",
policy =>
{
// I'm guessing
policy.WithOrigins("http://10.0.0.5:5000")
.AllowAnyHeader()
.AllowCredentials()
.WithMethods("POST");
policy.WithOrigins("http://10.0.0.1:8080")
.AllowAnyHeader()
.AllowCredentials()
.AllowAnyMethod();
});
});
app.UseCors("default")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment