Skip to content

Commit

Permalink
Minor fixes to Linux Consumption (#133)
Browse files Browse the repository at this point in the history
* Enable /Error Endpoint;

* Fix async endpoint
  • Loading branch information
Hazhzeng authored Aug 23, 2020
1 parent 6b3d31f commit 4ee0376
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Kudu.Services.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ public void Configure(IApplicationBuilder app,
new {controller = "LinuxConsumptionInstanceAdmin", action = "Info"},
new {verb = new HttpMethodRouteConstraint("GET")});
routes.MapRoute("admin-instance-assign", "admin/instance/assign",
new {controller = "LinuxConsumptionInstanceAdmin", action = "AssignAsync" },
new {controller = "LinuxConsumptionInstanceAdmin", action = "Assign" },
new {verb = new HttpMethodRouteConstraint("POST")});
// Live Command Line
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public IActionResult Info()
/// <returns>Expect 202 when receives the first call, otherwise, returns 409</returns>
[HttpPost]
[Authorize(Policy = AuthPolicyNames.AdminAuthLevel)]
public async Task<IActionResult> AssignAsync([FromBody] EncryptedHostAssignmentContext encryptedAssignmentContext)
public IActionResult Assign([FromBody] EncryptedHostAssignmentContext encryptedAssignmentContext)
{
var containerKey = System.Environment.GetEnvironmentVariable(SettingsKeys.ContainerEncryptionKey);
var assignmentContext = encryptedAssignmentContext.Decrypt(containerKey);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public class LinuxConsumptionRouteMiddleware
"/api/settings",
"/admin/instance",
"/deployments",
"/zipdeploy"
"/zipdeploy",
"/Error"
};

private readonly RequestDelegate _next;
Expand Down

0 comments on commit 4ee0376

Please sign in to comment.