mirror of
https://github.com/chatmail/relay.git
synced 2026-05-19 20:38:05 +00:00
Do not use redirect on /cgi-bin/newemail.py
Delta Chat does not follow redirects, so it breaks old QR codes printed on paper and published on various web pages.
This commit is contained in:
@@ -58,8 +58,19 @@ http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Old URL for compatibility with e.g. printed QR codes.
|
# Old URL for compatibility with e.g. printed QR codes.
|
||||||
|
#
|
||||||
|
# Copy-paste instead of redirect to /new
|
||||||
|
# because Delta Chat core does not follow redirects.
|
||||||
|
#
|
||||||
|
# Redirects are only for browsers.
|
||||||
location /cgi-bin/newemail.py {
|
location /cgi-bin/newemail.py {
|
||||||
return 301 /new;
|
if ($request_method = GET) {
|
||||||
|
return 301 dcaccount:https://{{ config.domain_name }}/new;
|
||||||
|
}
|
||||||
|
|
||||||
|
fastcgi_pass unix:/run/fcgiwrap.socket;
|
||||||
|
include /etc/nginx/fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME /usr/lib/cgi-bin/newemail.py;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user