[openstreetmap/openstreetmap-website] Roll back host override on user avatar urls (#2319)

Andy Allan notifications at github.com
Wed Jul 17 09:25:45 UTC 2019


With 40ac2aa5280f46c0c8cf3676596334269ec2f696 I get a test failure, since `Settings.server_url` (used in the code) != `test.host` (expected by the tests).

With the parent of that commit, it works fine. I think the problem described in the comments in #2296 was fully fixed by the change from `url_for` to `polymorphic_url` in b911b45961165d64fba577d4cb87740d89ec6784. I found a ticket (https://github.com/rails/rails/issues/32948#issuecomment-390817882) that describes that `url_for` is expected to give relative urls (which is a documented quirk) whereas `polymophic_url` should give fully-qualified urls.

Since we us fully-qualified urls all over the place, without needing `Settings.url` each time, I think it will be safe to remove. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2319
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190717/72d36b75/attachment.html>


More information about the rails-dev mailing list