From fec68e9a9f51ddf458703b484f54f5d20b23588d Mon Sep 17 00:00:00 2001 From: endernon Date: Thu, 10 Oct 2024 00:04:33 +0100 Subject: [PATCH] add nginx config --- README.md | 4 +++- config/nginx | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 config/nginx diff --git a/README.md b/README.md index 8aabffb..1c1a20c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # return_204 -simple config for a replacement of the android 204 generation. \ No newline at end of file +simple config for a replacement of the android 204 generation. + +This repository includes a script to run in root android shell and a nginx config. diff --git a/config/nginx b/config/nginx new file mode 100644 index 0000000..cd91712 --- /dev/null +++ b/config/nginx @@ -0,0 +1,21 @@ +server { + # listen http + listen 80; + # listen http, ipv6 + listen [::]:80; + # listen https + listen 443; + # listen https, ipv6 + listen [::]:443; + + + # REPLACE THE EXAMPLE DOMAIN BELOW + server_name subdomain.example.com; + + # return 204 by default + return 204; + + # intercept errors and redirect to 204 + proxy_intercept_errors on; + error_page 500 502 503 504 =204; +}