Skip to content
This repository was archived by the owner on Sep 18, 2018. It is now read-only.

Commit b851d06

Browse files
author
Brad Metcalf
committed
Changed host to DNS name instead of IP
1 parent c7bbd9e commit b851d06

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/bridge.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function runPHP(req, response, next, phpinfo){
5555
ALL_RAW: Object.keys(req.headers).map(function(x){return x+": "+req.headers[x];}).reduce(function(a, b){return a+b+"\n";}, ""), //All HTTP headers as sent by the client in raw form. No transformation on the header names is applied.
5656
SERVER_SOFTWARE: "php-webkit", //The web server's software identity.
5757
SERVER_NAME: phpinfo.host, //The host name or the IP address of the computer running the web server as given in the requested URL.
58-
SERVER_ADDR: phpinfo.host, //The IP address of the computer running the web server.
58+
SERVER_ADDR: req.connection.localAddress || req.socket.localAddress || req.connection.socket.localAddress || "", //The IP address of the computer running the web server.
5959
SERVER_PORT: (phpinfo.port == 0 ? req.connection.localPort : phpinfo.port), //The port to which the request was sent.
6060
GATEWAY_INTERFACE: "CGI/1.1", //The CGI Specification version supported by the web server; always set to CGI/1.1.
6161
SERVER_PROTOCOL: "", //The HTTP protocol version used by the current request.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"phpwebkit": {
2222
"bin": "",
2323
"path": "./application",
24-
"host": "127.0.0.1",
24+
"host": "localhost",
2525
"port": 9090
2626
},
2727
"license":"MIT",

php-webkit/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var phpwebkit = {
4040

4141
var host = gui.App.manifest.phpwebkit.host;
4242
if(host === undefined || host == "") {
43-
host = '127.0.0.1';
43+
host = 'localhost';
4444
}
4545

4646
var port = gui.App.manifest.phpwebkit.port;

0 commit comments

Comments
 (0)