mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-09-22 23:15:25 +00:00
Merge pull request #266 from gfs/gfs/listen-on-127.0.0.1
Fix ASP.NET backend listening on 0.0.0.0
This commit is contained in:
@@ -15,7 +15,7 @@ namespace ElectronNET.API.Entities
|
||||
public bool DevTools { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Whether node integration is enabled. Default is true.
|
||||
/// Whether node integration is enabled. Required to enable IPC. Default is true.
|
||||
/// </summary>
|
||||
[DefaultValue(true)]
|
||||
public bool NodeIntegration { get; set; } = true;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace ElectronNET.API
|
||||
if(HybridSupport.IsElectronActive)
|
||||
{
|
||||
builder.UseContentRoot(AppDomain.CurrentDomain.BaseDirectory)
|
||||
.UseUrls("http://localhost:" + BridgeSettings.WebPort);
|
||||
.UseUrls("http://127.0.0.1:" + BridgeSettings.WebPort);
|
||||
}
|
||||
|
||||
return builder;
|
||||
|
||||
13
README.md
13
README.md
@@ -254,3 +254,16 @@ If you still use this version you will need to invoke it like this:
|
||||
```
|
||||
dotnet electronize ...
|
||||
```
|
||||
|
||||
## Node Integration
|
||||
Electron.NET requires Node Integration to be enabled for IPC to function. If you are not using the IPC functionality you can disable Node Integration like so:
|
||||
|
||||
```csharp
|
||||
WebPreferences wp = new WebPreferences();
|
||||
wp.NodeIntegration = false;
|
||||
BrowserWindowOptions browserWindowOptions = new BrowserWindowOptions
|
||||
{
|
||||
WebPreferences = wp
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
set ENETVER=5.22.12
|
||||
echo "Start building Electron.NET dev stack..."
|
||||
echo "Restore & Build API"
|
||||
cd ElectronNet.API
|
||||
dotnet restore
|
||||
dotnet build --configuration Release --force /property:Version=5.22.12
|
||||
dotnet pack /p:Version=5.22.12 --configuration Release --force --output "%~dp0artifacts"
|
||||
dotnet build --configuration Release --force /property:Version=%ENETVER%
|
||||
dotnet pack /p:Version=%ENETVER% --configuration Release --force --output "%~dp0artifacts"
|
||||
cd ..
|
||||
echo "Restore & Build CLI"
|
||||
cd ElectronNet.CLI
|
||||
dotnet restore
|
||||
dotnet build --configuration Release --force /property:Version=5.22.12
|
||||
dotnet pack /p:Version=5.22.12 --configuration Release --force --output "%~dp0artifacts"
|
||||
dotnet build --configuration Release --force /property:Version=%ENETVER%
|
||||
dotnet pack /p:Version=%ENETVER% --configuration Release --force --output "%~dp0artifacts"
|
||||
cd ..
|
||||
Reference in New Issue
Block a user