<rule name="OnlyOffice_Proxy_Inbound" stopProcessing="true">
<match url="^onlyofficeapi/(.*)" ignoreCase="true" />
<serverVariables>
<!-- Nginx $the_prefix için -->
<set name="HTTP_X_FORWARDED_PREFIX" value="/onlyofficeapi" />
</serverVariables>
<action type="Rewrite" url="http://127.0.0.1:8080/{R:1}" appendQueryString="true" />
</rule>
In this url rewrite rule i send /onlyofficeapi to prefix. ds-docservice.conf uses this prefix value and return true url.