Invalid directories redirecting to SSO Login Page

Hello fellow selfhosters

My YunoHost server

Hardware: VPS bought online
YunoHost version: 11.2.27 (stable)
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If yes, please explain:
Self-hosting experience noob

Invalid directories redirecting to SSO login page

Invalid directories such as https://mydomain.tld/foo redirect to the YunoHost Admin Portal https://mydomain.tld/yunohost/sso/

This is not a new issues see 1. Stop redirecting to SSO portal by default, report HTTP error instead 2. App redirecting to SSO or 3. Redirect SSO to subdomain 4. How to stop non registered sub domains from redirecting to admin interface?

I have tried editing the /etc/ssowat/conf.json.persistent file to
{ "skipped_urls": [ "mydomain.tld/landing_page" ] }
I did not notice any changes - invalid URLs still redirected to Login Portal.

and

{ "redirected_regex": { "https?://[^/]+/(?!app1[\\Z/]|app2[\\Z/]|yunohost[\\Z/]|\\.well-known/).*": "https://mydomain.tld/landing_page" } }

all URLs redirected to https://mydomain.tld/landing_page

I have also editing the /etc/nginx/conf.d/yunohost_admin.conf file

from

location /yunohost { # Redirect most of 404 to maindomain.tld/ access_by_lua_file /usr/share/ssowat/access.lua; }

to

location /yunohost { return 302 https://mydomain.tld/landing_page; }
with no noticeable change - invalid URLs redirected to SSO page

I have not tried configuring to this guide as I do not know what to change.

What did I do wrong?

Thanks!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.