Add a configurable base path
ckocyigit opened this issue · comments
Hello,
it would be nice to be able to run the whole application under a base path.
E.g.: localhost:5000/app
I've tried:
var appPath = Environment.GetEnvironmentVariable("BASE_PATH");
if (!string.IsNullOrEmpty(appPath))
{
app.Use(async (context, next) =>
{
context.Request.PathBase = new PathString(appPath);
await next();
});
}
And
var basePath = Environment.GetEnvironmentVariable("BASE_PATH");
if (!string.IsNullOrEmpty(basePath))
{
app.UsePathBase(basePath);
}
Within Program.cs.
But both attemps unfortuntely were unsuccessful
UsePathBase however worked for the login-screen and started trying to redirect to non-UsePathBase patterns afterwards.