Merge pull request #1233 from tgstation/FixUnauthorizedGetHome [TGSDeploy]

v4.10.1
This commit is contained in:
Jordan Brown
2021-02-25 18:23:03 -05:00
committed by GitHub
3 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<!-- Integration tests will ensure they match across the board -->
<Import Project="ControlPanelVersion.props" />
<PropertyGroup>
<TgsCoreVersion>4.10.0</TgsCoreVersion>
<TgsCoreVersion>4.10.1</TgsCoreVersion>
<TgsConfigVersion>3.0.0</TgsConfigVersion>
<TgsApiVersion>9.0.0</TgsApiVersion>
<TgsApiLibraryVersion>9.0.0</TgsApiLibraryVersion>
@@ -163,7 +163,7 @@ namespace Tgstation.Server.Host.Controllers
if (ApiHeaders == null)
{
if (controlPanelConfiguration.Enable)
if (controlPanelConfiguration.Enable && !Request.Headers.TryGetValue(ApiHeaders.ApiVersionHeader, out _))
{
Logger.LogDebug("No API headers on request, redirecting to control panel...");
return Redirect(ControlPanelController.ControlPanelRoute);
@@ -186,7 +186,13 @@ namespace Tgstation.Server.Host.Controllers
var job = new Job
{
Description = String.Format(CultureInfo.InvariantCulture, "Clone branch {1} of repository {0}", origin, cloneBranch ?? "master"),
Description = String.Format(
CultureInfo.InvariantCulture,
"Clone{1} repository {0}",
origin,
cloneBranch != null
? $"\"{cloneBranch}\" branch of"
: String.Empty),
StartedBy = AuthenticationContext.User,
CancelRightsType = RightsType.Repository,
CancelRight = (ulong)RepositoryRights.CancelClone,