Check X-Forwarded-Proto when returning the url

Closes #31