Skip to content
This repository has been archived by the owner on Nov 1, 2018. It is now read-only.

Switch to UsePathBase instead of relying on Kestrel feature #236 #251

Merged
merged 1 commit into from
Aug 17, 2016

Conversation

JunTaoLuo
Copy link
Contributor


Assert.Null(builder.GetSetting(WebHostDefaults.ServerUrlsKey));

// Adds a server and calls Build()
var server = new TestServer(builder);

Assert.Equal("http://localhost:12345/", builder.GetSetting(WebHostDefaults.ServerUrlsKey));
Assert.Equal("http://localhost:12345", builder.GetSetting(WebHostDefaults.ServerUrlsKey));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slight behaviour change. Paths that represent empty paths will no longer be appended to the url address that the server sees.

@Tratcher
Copy link
Member

:shipit:

@JunTaoLuo JunTaoLuo merged commit 2f397d6 into dev Aug 17, 2016
@JunTaoLuo JunTaoLuo deleted the johluo/usepathbasemiddleware branch August 17, 2016 03:57
}

public Action<IApplicationBuilder> Configure(Action<IApplicationBuilder> next)
{
return app =>
{
app.UsePathBase(_pathBase);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just avoid the middleware if the pathbase is empty?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UsePathBase already does that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's being done in the middleware.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants