summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-05-22 23:40:22 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-05-22 23:40:22 -0400
commit9aba50451b617e1af8215358afda22c8105477f2 (patch)
treefa4195493bf82ef75331371db3353c65fc2efe5d /src/SMAPI.Web
parentb074eb279a649030e71ed2192bb6a528a9801fce (diff)
downloadSMAPI-9aba50451b617e1af8215358afda22c8105477f2.tar.gz
SMAPI-9aba50451b617e1af8215358afda22c8105477f2.tar.bz2
SMAPI-9aba50451b617e1af8215358afda22c8105477f2.zip
keep verb when redirecting api.smapi.io
Diffstat (limited to 'src/SMAPI.Web')
-rw-r--r--src/SMAPI.Web/Framework/RedirectRules/RedirectPathsToUrlsRule.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/SMAPI.Web/Framework/RedirectRules/RedirectPathsToUrlsRule.cs b/src/SMAPI.Web/Framework/RedirectRules/RedirectPathsToUrlsRule.cs
index 16397c1e..d9d44641 100644
--- a/src/SMAPI.Web/Framework/RedirectRules/RedirectPathsToUrlsRule.cs
+++ b/src/SMAPI.Web/Framework/RedirectRules/RedirectPathsToUrlsRule.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
+using System.Net;
using System.Text.RegularExpressions;
using Microsoft.AspNetCore.Rewrite;
@@ -22,6 +23,7 @@ namespace StardewModdingAPI.Web.Framework.RedirectRules
/// <param name="map">Regex patterns matching the current URL mapped to the resulting redirect URL.</param>
public RedirectPathsToUrlsRule(IDictionary<string, string> map)
{
+ this.StatusCode = HttpStatusCode.RedirectKeepVerb;
this.Map = map.ToDictionary(
p => new Regex(p.Key, RegexOptions.IgnoreCase | RegexOptions.Compiled),
p => p.Value