1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2024-11-23 00:27:30 +00:00

Add setting for bind IP (default is still 0.0.0.0)

This commit is contained in:
Cadence Ember 2020-04-18 00:18:58 +12:00
parent c9ac37c586
commit 8398049f02
No known key found for this signature in database
GPG Key ID: 128B99B1B74A6412
2 changed files with 6 additions and 0 deletions

View File

@ -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. // If you are using nginx to make Bibliogram accessible on port 80/443, do NOT write a port here.
// For example, "https://bibliogram.art" // For example, "https://bibliogram.art"
website_origin: "http://localhost:10407", 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 to actually run the webserver on.
port: 10407, port: 10407,
// You MUST read /src/site/pug/privacy.pug.template before changing has_privacy_policy! // You MUST read /src/site/pug/privacy.pug.template before changing has_privacy_policy!

View File

@ -6,6 +6,7 @@ const passthrough = require("./passthrough")
const pinski = new Pinski({ const pinski = new Pinski({
port: +process.env.PORT || constants.port, port: +process.env.PORT || constants.port,
ip: constants.bind_ip,
relativeRoot: __dirname, relativeRoot: __dirname,
basicCacheControl: { basicCacheControl: {
exts: ["ttf", "woff2", "png", "jpg", "jpeg", "svg", "gif", "webmanifest", "ico"], exts: ["ttf", "woff2", "png", "jpg", "jpeg", "svg", "gif", "webmanifest", "ico"],