Skip to content

Add a new setting to redirect unknown URLs to either the SSO portal or a 404 page#212

Open
Salamandar wants to merge 1 commit into
YunoHost:devfrom
Salamandar:portal_404
Open

Add a new setting to redirect unknown URLs to either the SSO portal or a 404 page#212
Salamandar wants to merge 1 commit into
YunoHost:devfrom
Salamandar:portal_404

Conversation

@Salamandar

Copy link
Copy Markdown

My company would like to disable the automatic "unknown url -> SSO portal" redirection. We would prefer a standard 404 web page.

/!\ UNTESTED /!\

@Salamandar Salamandar force-pushed the portal_404 branch 5 times, most recently from 32bc4c6 to 22ec0c2 Compare March 10, 2023 13:14
Comment thread access.lua
---
--- 5. REDIRECT TO 404 PAGE IF UNKNOWN URL -> PORTAL IS DISABLED
---
if not conf["err404_to_portal"] and longest_url_match == "" then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah that's interesting because URL which do match a permission in the SSOwat conf will still redirect to the portal

Dunno if that was the intent but to me that's indeed the behavior we want ;)

@Salamandar Salamandar Mar 10, 2023

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmmm.
Yeah, I think that is. Although… That could very well be configurable too. Do you want the public to know you have a mydomain.tld/very_secret_app_with_a_well_known_name_in_the_url ?

For now, an existing app and a non-existing one will have the same behaviour. Maybe some people will want to keep that.
There would be 2 settings :

  • Redirect unknown urls to 404 -> default should be true
  • Redirect known URLs to 404 instead of login page -> default should be false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants