diff --git a/src/lib/constants.js b/src/lib/constants.js index 2d75600..b1f6fbb 100644 --- a/src/lib/constants.js +++ b/src/lib/constants.js @@ -11,6 +11,11 @@ let constants = { // If you are using nginx to make Bibliogram accessible on port 80/443, do NOT write a port here. // For example, "https://bibliogram.art" website_origin: "http://localhost:10407", + // IP address to bind to. + // "0.0.0.0" will make the server reachable on all IPv4 interfaces. + // "::" will make the server reachable on all IPv6 interfaces, and maybe also IPv4. (https://nodejs.org/api/net.html#net_server_listen_port_host_backlog_callback) + // If you run nginx, you must change the nginx config instead. + bind_ip: "0.0.0.0", // Port to actually run the webserver on. port: 10407, // You MUST read /src/site/pug/privacy.pug.template before changing has_privacy_policy! diff --git a/src/site/server.js b/src/site/server.js index 8931819..4d19261 100644 --- a/src/site/server.js +++ b/src/site/server.js @@ -6,6 +6,7 @@ const passthrough = require("./passthrough") const pinski = new Pinski({ port: +process.env.PORT || constants.port, + ip: constants.bind_ip, relativeRoot: __dirname, basicCacheControl: { exts: ["ttf", "woff2", "png", "jpg", "jpeg", "svg", "gif", "webmanifest", "ico"],