Cms 4.7 deployment with contextpath but without contextpath in url generation

We have a deployment environment where enonic 4.7 has to run with a /cms context path, but we would like the url’s generated by enonic to drop the /cms prefix.
Is there any config that we can use to have links

url:
http://mysite.com
what enonic gets after ngnix:
http://mysite.com/cms

so enonic generates links like:
http://mysite.com/cms/subpage

but we would like enonic to generate links without /cms context path, like:
http://mysite.com/subpage

I have found a java test in the cms codebase that checks for contextPath:
com.enonic.cms.server.DeploymentAndRequestSetupTest#when_deployed_at_cms_debug_requested_at_under_subpath_admin

 @Test
public void when_deployed_at_cms_debug_requested_at_under_subpath_admin()
{
    MockHttpServletRequest request = new MockHttpServletRequest();
    new DeploymentAndRequestSetup().appDeployedAt( "/cms" ).originalRequest( "www.mysite.com",
                                                                             "/cms/admin/site/0/political news shortcut" ).requestedSite(
        0, "political news shortcut" ).requestedAdminDebugAt().setupAtDefaultPath().back().setup( request );

    assertEquals( "scheme", "http", request.getScheme() );
    assertEquals( "serverName", "www.mysite.com", request.getServerName() );
    assertEquals( "contextPath", "/cms", request.getContextPath() );
    assertEquals( "servletPath", "/site", request.getServletPath() );
    assertEquals( "requestURI", "/cms/site/0/political+news+shortcut", request.getRequestURI() );

    assertEquals( Attribute.BASEPATH_OVERRIDE_ATTRIBUTE_NAME, null,
                  request.getAttribute( Attribute.BASEPATH_OVERRIDE_ATTRIBUTE_NAME ) );
    assertEquals( null, VirtualHostHelper.getBasePath( request ) );

    assertEquals( "requestURL", "http://www.mysite.com:80/cms/site/0/political+news+shortcut", request.getRequestURL().toString() );
}

is there anything like this BASEPATH_OVERRIDE_ATTRIBUTE_NAME that we could use to set the contextpath?