abp
abp copied to clipboard
Error on Angular deploy on IIS
ABP 5.3.1
I've publish new app UI on IIS and I get an error on every first load.
Looking on console I see that ABP call getEnvConfig (that not exists). On new template in nginx I see the redirect to dynamic-env.json
I change the rewrite rule with this on web.config and I solve
<rule name="Angular Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(getEnvConfig)" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
<rule name="getEnvConfig" enabled="true" patternSyntax="ExactMatch" stopProcessing="true">
<match url="getEnvConfig" />
<action type="Redirect" url="dynamic-env.json" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
</rule>
</rules>