always use vite-proxy port from options
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Mixtape\Mixtape.csproj" />
|
<ProjectReference Include="..\mixtape\mixtape.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Mixtape\Mixtape.csproj" />
|
<ProjectReference Include="..\mixtape\mixtape.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -26,10 +26,7 @@ public class ViteScriptTagHelper(IWebHostEnvironment env, IMixtapeOptions option
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int? viteProxyPort = 5123;
|
int? viteProxyPort = options.For<ViteProxy.ViteProxyOptions>().Port;
|
||||||
#if DEBUG
|
|
||||||
viteProxyPort = options.For<ViteProxy.ViteProxyOptions>().Port;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
HttpRequest request = ViewContext.HttpContext.Request;
|
HttpRequest request = ViewContext.HttpContext.Request;
|
||||||
string fullPath = $"{request.Scheme}://{request.Host.Host}:{viteProxyPort}/{Src}";
|
string fullPath = $"{request.Scheme}://{request.Host.Host}:{viteProxyPort}/{Src}";
|
||||||
|
|||||||
Reference in New Issue
Block a user