summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web')
-rw-r--r--src/SMAPI.Web/Startup.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/SMAPI.Web/Startup.cs b/src/SMAPI.Web/Startup.cs
index bc491128..0ea9f7ee 100644
--- a/src/SMAPI.Web/Startup.cs
+++ b/src/SMAPI.Web/Startup.cs
@@ -64,6 +64,12 @@ namespace StardewModdingAPI.Web
loggerFactory.AddConsole(this.Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
app
+ .UseCors(policy => policy
+ .AllowAnyHeader()
+ .AllowAnyMethod()
+ .WithOrigins("https://smapi.io", "https://*.smapi.io", "https://*.edge.smapi.io")
+ .SetIsOriginAllowedToAllowWildcardSubdomains()
+ )
.UseRewriter(new RewriteOptions()
// redirect to HTTPS (except API for Linux/Mac Mono compatibility)
.Add(new ConditionalRedirectToHttpsRule(