Restrict remote ports and limit protocol use in redirects