EPrints Technical Mailing List Archive

Message: #04760


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: https and $session->config('userhome')


Hi Brian

Yes, that's what I'm saying.  It was an ill-conceived set of default options.

--
Adam Field
Business Relationship Manager and Community Lead
EPrints Services



On 23 Sep 2015, at 17:43, Brian D. Gregg <bdgregg@pitt.edu> wrote:

Adam,

 

So essentially what you’re saying is that theoretically we can drop the /secure and /secure/cgi from the config?

 

I will have to try that if that is indeed the case.

 

-Brian.

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Adam Field
Sent: Wednesday, September 23, 2015 12:30 PM
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Re: https and $session->config('userhome')

 

Try:

 

                $repo->config( "rel_path" )

 

Also, would suggest not using a different path for secure.  A modern 10_core should look something like this:

 

# This file was created by bin/epadmin

# You can regenerate this file by doing ./bin/epadmin config_core tweets

$c->{host} = 'websci-tweets.ecs.soton.ac.uk';

$c->{port} = 80;

$c->{aliases} = [];

$c->{securehost} = 'websci-tweets.ecs.soton.ac.uk';

$c->{secureport} = 443;

$c->{http_root} = undef;

 

(stolen from one of my twitter harvesters.

 

--
Adam Field
Business Relationship Manager and Community Lead
EPrints Services

 

 

 

On 21 Sep 2015, at 14:53, Brian D. Gregg <bdgregg@pitt.edu> wrote:



All,

 

I did some digging on this trying different values to handle the problem of “Edit Profile” link being broken when under https after you login.

 

I ended up replacing the line here: https://github.com/eprintsug/meprints/blob/66da9c9c7bfb04dfa202368ad03cacc5ffe61fca/lib/plugins/EPrints/Plugin/Screen/User/EditLink.pm#L64  with the following which now redirects properly under https.

 

Here’s my code change for line 64 of EditLink.pm.  I’m not sure what the difference is between the original code and my code as it seems as though they should be the same.

 

        my $config = $self->{config};

        my $url = "" $config->{"userhome"} );

 

Also, using the standard https setup as documented here: http://wiki.eprints.org/w/How_to_use_EPrints_with_HTTPS the include line for apache has changed to “Include /opt/eprints3/cfg/apache_ssl.conf” at what version this include has changed I have no idea.  I’d update the documentation but reluctant to do so as I don’t know when this changed version wise.  This took a while to figure out.

 

Thanks,

Brian Gregg.

 

Brian D. Gregg

Solutions Architect | Manager Systems Development

University of Pittsburgh | University Library System

Address: 7500 Thomas Blvd.  Room 129 Pittsburgh, PA 15208

Tel: (412) 648-3264 | Email: bdgregg@pitt.edu | Fax: (412) 648-3585

 

 

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Brian D. Gregg
Sent: Friday, September 18, 2015 12:21 PM
To: 'eprints-tech@ecs.soton.ac.uk' <eprints-tech@ecs.soton.ac.uk>
Subject: [EP-tech] https and $session->config('userhome')

 

All,

 

What is the best config value to use for the base URL when dealing with both http and https connections?

 

I see in 10_core.pl the following defined, but obviously they don’t automatically switch based upon http vs. https.

$c->{http_root} = undef;

$c->{https_root} = '/secure';

$c->{http_cgiroot} = '/cgi';

$c->{https_cgiroot} = '/secure/cgi';

 

But is there a $session->config(‘{???}’) value that automatically switches between http and https as needed?

 

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: https://github.com/eprintsug/meprints/blob/66da9c9c7bfb04dfa202368ad03cacc5ffe61fca/lib/plugins/EPrints/Plugin/Screen/User/EditLink.pm#L64  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.

 

Any suggestions?

 

Thanks,

Brian.

 

Brian D. Gregg

Solutions Architect | Manager Systems Development

University of Pittsburgh | University Library System

Address: 7500 Thomas Blvd.  Room 129 Pittsburgh, PA 15208

Tel: (412) 648-3264 | Email: bdgregg@pitt.edu | Fax: (412) 648-3585

 

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/

 

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/