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

UsePathBase does not disable root path #893

@ben-foster-cko

Description

@ben-foster-cko

When configuring the base path of the application, the root path continues to work, for example:

        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            app.UsePathBase("/basepath");

            app.Map("/ping", map => map.Run(async 
                ctx => await ctx.Response.WriteAsync("pong")));

            app.UseMvc();
        }

With this configuration both /basepath/ping and /ping work. I would expect /ping to return a 404.

This is the same behavior demonstrated by setting ASPNETCORE_URLS to http://+:5000/basepath though I believe setting the base path this way has been depreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions