<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">All,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">What is the best config value to use for the base URL when dealing with both http and https connections?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I see in 10_core.pl the following defined, but obviously they don’t automatically switch based upon http vs. https.<o:p></o:p></p>
<p class="MsoNormal">$c->{http_root} = undef;<o:p></o:p></p>
<p class="MsoNormal">$c->{https_root} = '/secure';<o:p></o:p></p>
<p class="MsoNormal">$c->{http_cgiroot} = '/cgi';<o:p></o:p></p>
<p class="MsoNormal">$c->{https_cgiroot} = '/secure/cgi';<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">But is there a $session->config(‘{???}’) value that automatically switches between http and https as needed?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The reason I am asking is in the code for meprints, we are having an issue with the “Edit Profile” link on the user’s homepage isn’t redirecting properly to https (aka “/secure/…”). I suspect that the issue is found here:
<a href="https://github.com/eprintsug/meprints/blob/66da9c9c7bfb04dfa202368ad03cacc5ffe61fca/lib/plugins/EPrints/Plugin/Screen/User/EditLink.pm#L64">
https://github.com/eprintsug/meprints/blob/66da9c9c7bfb04dfa202368ad03cacc5ffe61fca/lib/plugins/EPrints/Plugin/Screen/User/EditLink.pm#L64</a> However, I’m at a loss as to what to replace the $session->config( ‘userhome’ ) value with. I suspect that there
is a https or /secure that needs prepended to the string and I figure there is a short cut that I can use like $session->config( ‘cgiurl’ ) etc. or something similar.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any suggestions?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Brian.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="font-size:18.0pt;color:#323E4F">Brian D. Gregg<o:p></o:p></span></b></p>
<p class="MsoNormal"><i><span style="font-size:14.0pt;color:#323E4F">Solutions Architect
</span></i><span style="font-size:14.0pt;color:#323E4F">|<i> Manager Systems Development<o:p></o:p></i></span></p>
<p class="MsoNormal"><span style="color:#323E4F">University of Pittsburgh | University Library System<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#323E4F">Address: <a href="https://maps.google.com/maps?q=7500+Thomas+Blvd,+Pittsburgh,+PA&hl=en&sll=41.117935,-77.604698&sspn=7.662465,13.73291&oq=7500+Tho&t=h&hnear=7500+Thomas+Blvd,+Pittsburgh,+Pennsylvania+15208&z=17" target="_blank">
7500 Thomas Blvd. Room 129 Pittsburgh, PA 15208</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#17365D">Tel: (412) 648-3264 | Email: <a href="mailto:bdgregg@pitt.edu">
bdgregg@pitt.edu</a> | Fax: (412) 648-3585<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>