[ome-users] A bit of django help - need to change login page behaviour, slightly

Aleksandra Tarkowska (Staff) A.Tarkowska at dundee.ac.uk
Tue Aug 18 13:57:17 BST 2015


Hi Jake,

I understood that you want to help users to chose where they should go by
placing an index page on https://blah.blah.blah.blah, that will allow them
to click on custom buttons:

<a href="https://blah.blah.blah.blah/webclient/login/">LOGIN</a> or <a
href="https://blah.blah.blah.blah/webclient">PUBLIC SPACE</a>

webstart/index.html was just an example of how such a template could look
like and helps to alter as required.



omero.web.public.url_filter is not designed to handle your case. If you
wish to permanently redirect https://blah.blah.blah.blah  to
https://blah.blah.blah.blah/webclient/login/?url=%2Fwebclient%2F you need
to do it on your websereve configuration

For example nginx

location / {
  rewrite ^/$ https://blah.blah.blah.blah/webclient/login permanent;
    }



Kind regards
Ola





On 18/08/2015 13:23, "Jake Carroll" <jake.carroll at uq.edu.au> wrote:

>Hi there. Thanks for getting back to me.
>
>OK. That is close, but I guess the premise is still sort of broken/not
>quite what it quite should be.
>
>I think we¹re getting closer.
>
>If I set:
>
>bin/omero config set omero.web.index_template 'webstart/index.html'
>
>The landing page I end up on is actually the ³click to download the
>Insight Client² page - which isn¹t bad/is sensible, but really, the FIRST
>URL the environment should hit, ideally is:
>
>
>https://blah.blah.blah.blah/webclient/login/?url=%2Fwebclient%2F
>
>
>I believe the reason it does not hit this first is because of the use of
>the following:
>
>omero.web.public.enabled=True
>omero.web.public.password=xyzxyzxyz
>omero.web.public.server_id=1
>omero.web.public.url_filter=^/(?!webadmin|webclient/logout/|webclient/acti
>on/\w+|webclient/annotate_(file|tags|comment))
>omero.web.public.user=xyzxyzxyz
>
>So I need to somehow find a way of ultimate redirection landing to:
>
>https://blah.blah.blah.blah/webclient/login/?url=%2Fwebclient%2F
>
>
>Before anything else - but somehow maintain the existence of the
>public-data/web public functions.
>
>Thanks!
>
>-jc
>
>
>
>
>>
>>Message: 11
>>Date: Mon, 17 Aug 2015 21:15:58 +0000
>>From: "Aleksandra Tarkowska (Staff)" <A.Tarkowska at dundee.ac.uk>
>>To: OME User Support List <ome-users at lists.openmicroscopy.org.uk>
>>Subject: Re: [ome-users] A bit of django help - need to change login
>>pagebehaviour, slightly
>>Message-ID: <70B2C901-DD97-4F0C-8642-9C85E41B5164 at dundee.ac.uk>
>>Content-Type: text/plain; charset="us-ascii"
>>
>>Hi Jake,
>>
>>You can turn on index page
>>
>>Either try default
>>
>>bin/omero config set omero.web.index_template 'webstart/index.html'
>>
>>Or as in the doc
>>https://www.openmicroscopy.org/site/support/omero5.1/sysadmins/customizat
>>ion.html#index-page create your own
>>
>>Make sure your web browser doesn't cache old redirection.
>>
>>I hope that helps.
>>
>>Kind regards
>>Ola
>_______________________________________________
>ome-users mailing list
>ome-users at lists.openmicroscopy.org.uk
>http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users


The University of Dundee is a registered Scottish Charity, No: SC015096



More information about the ome-users mailing list