always use vite-proxy port from options

This commit is contained in:
2026-05-05 11:48:00 +02:00
parent e34e5858d6
commit 4e99e0233a
3 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Mixtape\Mixtape.csproj" />
<ProjectReference Include="..\mixtape\mixtape.csproj" />
</ItemGroup>
</Project>
+1 -1
View File
@@ -15,7 +15,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Mixtape\Mixtape.csproj" />
<ProjectReference Include="..\mixtape\mixtape.csproj" />
</ItemGroup>
</Project>
+1 -4
View File
@@ -26,10 +26,7 @@ public class ViteScriptTagHelper(IWebHostEnvironment env, IMixtapeOptions option
return;
}
int? viteProxyPort = 5123;
#if DEBUG
viteProxyPort = options.For<ViteProxy.ViteProxyOptions>().Port;
#endif
int? viteProxyPort = options.For<ViteProxy.ViteProxyOptions>().Port;
HttpRequest request = ViewContext.HttpContext.Request;
string fullPath = $"{request.Scheme}://{request.Host.Host}:{viteProxyPort}/{Src}";