How to change root path ~/ in Razor in asp.net core : <p>The simplest question for which I can't find an answer.</p>

<p>I have an asp.net core 2.1 MVC application with Razor.</p>

<p>Application widely uses <code>~/path</code> syntax.
Everything works great if application runs from domain root (for example, from <a href="http://localhost:5000/" rel="noreferrer">http://localhost:5000/</a>)</p>

<p>But when I run application at non-root (for example, <a href="http://localhost:5000/app" rel="noreferrer">http://localhost:5000/app</a>) the Razor still uses root (<code>/</code>) as base path.</p>

<p>Question: how to configure this? How to specify base path for Razor's <code>~/</code>? There must be an environment variable for it :)</p>

<p>PS: Application run in docker behind the reverse proxy.</p>
