Issue Details (XML | Word | Printable)

Key: MBS-5122
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Kuno Woudt
Reporter: Robert Kaye
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
MusicBrainz Server

Use scheme relative links to support https

Created: 09/Aug/12 10:33 PM   Updated: 03/Sep/12 10:46 AM   Resolved: 03/Sep/12 10:46 AM
Component/s: Templates
Affects Version/s: None
Fix Version/s: Bug fixes, 2012-09-03

Issue Links:
Depends


 Description  « Hide

We have the first steps of https support happening right now. In order to make that fully work we need to change all internal links (links served by musicbrainz-server that point to musicbrainz-server to be scheme relative. (e.g. start with // and not / )



Robert Kaye made changes - 09/Aug/12 10:36 PM
Field Original Value New Value
Link This issue is a dependency of MBS-2411 [ MBS-2411 ]
Robert Kaye made changes - 09/Aug/12 10:37 PM
Fix Version/s Within 3 months [ 10115 ]
Ian McEwen added a comment - 09/Aug/12 10:59 PM

http://stackoverflow.com/questions/1664816/is-there-a-way-to-force-c-uri-for-in-catalyst-to-generate-a-uri-that-begins-wi seems to suggest how to make this work for c.uri_for, which is at least what our CSS/JS is done with.


Ian McEwen made changes - 09/Aug/12 11:04 PM
Link This issue depends on MBH-270 [ MBH-270 ]
patate12 added a comment - 10/Aug/12 08:03 AM

I've never seen links starting with //.
What is this (._.?) Do you have examples ?



Oliver Charles added a comment - 10/Aug/12 10:02 AM

@Ian: that's odd, we should be setting that to true anyway (as we do have a front end proxy).


patate12 added a comment - 10/Aug/12 10:16 AM

Thanks for the tip, Oliver ! That's interesting to know.


Ian McEwen added a comment - 10/Aug/12 10:28 AM

Oliver: We are setting the catalyst variable, but we weren't setting the X-Forwarded-Port at the frontend. Unfortunately, it doesn't seem to have worked, at least yet – what version of Catalyst is test.musicbrainz.org running, I wonder?


Oliver Charles added a comment - 13/Aug/12 01:18 PM

Test has Catalyst 5.9, so that doesn't seem to be the problem.


Oliver Charles added a comment - 13/Aug/12 01:34 PM

If you add this line:

fastcgi_param HTTPS on;

Everything works correctly. X-Forwarded-Port is for a reverse-proxy situation, which we're not in as we use FastCGI. Setting this to 1 unconditionally means that we'll always force https, which might not be what we want.


Oliver Charles made changes - 13/Aug/12 01:35 PM
Assignee Oliver Charles [ acid2 ]
Oliver Charles made changes - 13/Aug/12 01:35 PM
Status Open [ 1 ] In Progress [ 3 ]
Oliver Charles made changes - 13/Aug/12 01:35 PM
Assignee Oliver Charles [ acid2 ]
Kuno Woudt made changes - 20/Aug/12 12:08 PM
Assignee Kuno Woudt [ warp ]
Kuno Woudt added a comment - 22/Aug/12 08:08 AM

I've not bothered with scheme relative links as the tickets asks for. Instead, I've configured nginx to set HTTPS correctly, as ocharles describes.

commit 08eb69fcf1081cd0adb4a75abac91a48633769a6 in musicbrainz server.
commit 5215a888130a42d8e1a5cd9d950de2433f741db5 in the nginx configuration (test only).


Kuno Woudt made changes - 22/Aug/12 08:08 AM
Status In Progress [ 3 ] Review Submitted [ 5 ]
Kuno Woudt made changes - 27/Aug/12 07:50 AM
Status Review Submitted [ 5 ] In Beta Testing [ 10002 ]
Kuno Woudt added a comment - 27/Aug/12 07:51 AM

This is marked as "in beta testing" because the nginx config for our frontends shipped to beta, but we still need to set up certificates and configure the load balancers to actually enable https:// on beta.


Kuno Woudt made changes - 03/Sep/12 10:46 AM
Status In Beta Testing [ 10002 ] Closed [ 6 ]
Fix Version/s Bug fixes, 2012-09-03 [ 10151 ]
Fix Version/s Within 3 months [ 10115 ]
Resolution Fixed [ 1 ]