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

what enonic gets after ngnix:

so enonic generates links like:

but we would like enonic to generate links without /cms context path, like:

I have found a java test in the cms codebase that checks for contextPath:

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

    assertEquals( "scheme", "http", request.getScheme() );
    assertEquals( "serverName", "", 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", "", request.getRequestURL().toString() );

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