Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat (cht-android/issues/310) enable nginx to serve android app links #8275

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
}
Expand Down
5 changes: 5 additions & 0 deletions nginx/ssl-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down