To support both 'passkey' and 'token' announcement parameters for clients, I have enabled the use of both.
nginx.conf
This allows using both, while it checks which one is actually requested per request. For those who are using NGINX and would like to know how to support both, or anything else for that matter on any kind of rewrite.
Now we have
/announce/passkey/ ... /
/announce/token/ ... /
I updated the rewrite to support /passkey/ -or- /token/ read from parameter type for better adaption (within url, not =value)
nginx.conf
map $passkey $id_type { ~^\d+$ passkey; default token; }
rewrite ^/announce/([^/]*)/(?<passkey>[^/]+)/$ /announce.php?$id_type&$id_type=$passkey;
This allows using both, while it checks which one is actually requested per request. For those who are using NGINX and would like to know how to support both, or anything else for that matter on any kind of rewrite.
Now we have
/announce/passkey/ ... /
/announce/token/ ... /
I updated the rewrite to support /passkey/ -or- /token/ read from parameter type for better adaption (within url, not =value)
Last edited by STorrents2020 on 2022-06-24 19:23:19