adapt japi to permanent https redirection