diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 3af7f86549e..9c1f95cf873 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -20,6 +20,10 @@ http { default_type "text/plain"; root /etc/nginx/private/certbot; } + location = /.well-known/assetlinks.json { + default_type "application/json"; + alias /etc/nginx/private/android/assetlinks.json; + } location / { return 301 https://$host$request_uri; } @@ -57,6 +61,10 @@ http { add_header X-Frame-Options SAMEORIGIN; + location = /.well-known/assetlinks.json { + default_type "application/json"; + alias /etc/nginx/private/android/assetlinks.json; + } include /etc/nginx/conf.d/server.conf; } } diff --git a/nginx/ssl-install.sh b/nginx/ssl-install.sh index 56325651d70..9fbce3498af 100755 --- a/nginx/ssl-install.sh +++ b/nginx/ssl-install.sh @@ -130,8 +130,13 @@ EOF echo "nginx configured to work with certbot" } +prepare_android_assetlink(){ + mkdir -p /etc/nginx/private/android +} + main (){ welcome_message + prepare_android_assetlink select_ssl_certificate_mode echo "Launching Nginx" >&2 }