Starcounter/Starcounter.Authorization

Make the 404 page navigable

Closed this issue · 2 comments

Pasted from Slack thread started by @mtornwall:


We have a problem with how the Authorization library handles the unauthorized/unauthenticated cases.
If you are unauthorized to access a particular page it sends a 404 without a body, which crashes the session irrecoverably.

So David and I discussed this and we have the following solution in mind:

  1. We add a file /sys/error/404.html or similar, providing a default error page.
  2. We change the Authorization library so that it sends new Json() { Html = "/sys/error/404.html" } if user is unauthenticated or unauthorized.

In the future we should extend it so that this becomes the default 404 page for all requests.


The original thread: https://starcounter.slack.com/archives/C7677F70W/p1549988751039200

kegor commented

Closing because related PRs were merged.