Fixing generated secret URL to use the correct hostname