aboutsummaryrefslogtreecommitdiffstats
path: root/testing/grafana-image-renderer/10-host-param.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/grafana-image-renderer/10-host-param.patch')
-rw-r--r--testing/grafana-image-renderer/10-host-param.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/testing/grafana-image-renderer/10-host-param.patch b/testing/grafana-image-renderer/10-host-param.patch
new file mode 100644
index 0000000000..b4d3b7abbc
--- /dev/null
+++ b/testing/grafana-image-renderer/10-host-param.patch
@@ -0,0 +1,31 @@
+https://github.com/grafana/grafana-image-renderer/pull/40
+
+diff --git a/src/app.ts b/src/app.ts
+index fffcd3d..b5b58f6 100644
+--- a/src/app.ts
++++ b/src/app.ts
+@@ -22,7 +22,7 @@ async function main() {
+
+ const logger = new ConsoleLogger();
+ const browser = new Browser(logger);
+- const server = new HttpServer({port: argv.port}, logger, browser);
++ const server = new HttpServer({port: argv.port, host: argv.host}, logger, browser);
+
+ server.start();
+
+diff --git a/src/http-server.ts b/src/http-server.ts
+index 1aa875d..018bf6c 100644
+--- a/src/http-server.ts
++++ b/src/http-server.ts
+@@ -26,8 +26,9 @@ export class HttpServer {
+ return res.status(err.output.statusCode).json(err.output.payload);
+ });
+
+- this.app.listen(this.options.port);
+- this.log.info(`HTTP Server started, listening on ${this.options.port}`);
++ this.app.listen(this.options.port, this.options.host);
++ const hostlabel = this.options.host ? this.options.host : '';
++ this.log.info(`HTTP Server started, listening on ${hostlabel}:${this.options.port}`);
+ }
+
+ render = async (req: express.Request, res: express.Response) => {