From a9e1fd9bf8ea905870ad110048bad4db6f57597c Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sun, 14 Mar 2021 22:03:57 +0200 Subject: [PATCH] For usage in a browser. Nginx sends the response as an application/octet-stream so browsers try to download it. --- conf.d/myip.shore.co.il.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conf.d/myip.shore.co.il.conf b/conf.d/myip.shore.co.il.conf index 63903cc..0faccee 100644 --- a/conf.d/myip.shore.co.il.conf +++ b/conf.d/myip.shore.co.il.conf @@ -19,5 +19,8 @@ server { include snippets/security-txt.conf; include snippets/ssl.conf; error_page 404 /; - location = / { return 200 "$remote_addr"; } + location = / { + add_header Content-Type "text/plain; charset=utf-8"; + return 200 "$remote_addr"; + } } -- GitLab