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

Create fallback page for iOS browsers failing to open Tailscale login page #198

Merged
merged 3 commits into from
Oct 15, 2023
Merged
Changes from 2 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
3 changes: 2 additions & 1 deletion tailscale/rootfs/etc/nginx/templates/ingress.gtpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ server {
proxy_pass http://backend;

sub_filter_once off;
sub_filter 'document.location.href = url' 'window.open(url, "_blank").focus()';
sub_filter 'document.location.href = url' 'var result = window.open(url, "_blank"); if (result!== null) {result.focus()} else {document.write(\'<div style="background-color:white"><font color=black>Unable to open Tailscale in new window. Please copy this URL; open in a separate browser; and re-load the addon Web UI here when complete. <a href="\' + url + \'">\'+url+\'</a></font></div>\')}';
frenck marked this conversation as resolved.
Show resolved Hide resolved

}
}