-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customize initial 401 Unauthorized page (in a private setup) #149
Comments
can you elaborate on this issue? I want to check this one |
for routes that need to be protected with authentication there is a middleware used in the nodejs express setup. E.g: databus/server/app/api/routes/general.js Line 58 in 05ac87f
protector.protect() is the middleware call that checks authentication and redirects to a 401 in this case. Line 70 in 05ac87f
Since this also applied to read-only pages (that are never protected in non-private mode) it also returns an HTML representation of the 401 response. This is cool, except for the landing page that should still be customizable to some degree. I think it should use the customizable header of the default page. The customizable header is a feature that I am currently still working on. I will rush this, so this issue can be implemented You can already implement this though and copy the current header of the landing page (index.ejs) |
what should i define in this function to return it for read only pages.? function isReadOnlyRoute(req) { //Here , i updated this to only apply this feature to pages which are not read only
|
My explanation might have been misleading, there is no change or check needed for "read only". Private mode is supposed to route EVERYTHING to 401, nobody should see what is there except for authenticated users. The task is about creating an exception for the landing page at the root path "/". Expected behaviour:
My next merge will make the banner be contained in its own file banner.ejs that can be included into any other ejs file, such as a special private mode landing page. |
Hey, would love to give it a go |
Okay, the A custom 401 frontpage should include the banner via the ejs include syntax |
In a private databus setup I'm greeted with a 401 Unauthorized page. For the coypu project we would like to customize the welcome page, even in a private setup to show some helpful information.
The text was updated successfully, but these errors were encountered: