I solved the issue by removing the url redirect. The bare redirect was creating a loop due to nginx. Hope this helps someone in future.
A big thank you to @cpradio and @fefrei for their help!