Just an update, I used a custom user-agent to disable redirect for the client, there is a plugin for firefox that allows to use custom user-agents so he selects it and redirection stops, a simple if statement in nginx config is applied for this purpose.