Skip to content

Commit

Permalink
Vuln dashboard: Update Okta SSO hook (#17773)
Browse files Browse the repository at this point in the history
Closes: #17772
More context:
#17601 (comment)

Changes: 
- Updated the order of the vulnerability dashboard's HTTP middleware if
Okta SSO is enabled.
  • Loading branch information
eashaw authored Mar 22, 2024
1 parent 0d8b51a commit 413107b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module.exports = function (sails){
}

// Clone the existing routes
// NOTE: Changing sails.config after the app lifts goes against Sails.js conventions and this code should not be reproduced.
let appRoutes = Object.assign({}, sails.config.routes);
// Remove the routes for the built-in login page..
delete appRoutes['GET /login'];
Expand All @@ -45,9 +46,9 @@ module.exports = function (sails){
'bodyParser',
'compress',
'poweredBy',
'www',// Note: This changes the conventions of Sails.js. Don't ever replicate this or use Passport.js.
'oktaSSO',
'router',
'www',
'favicon',
];
// Specify a custom http middleware order, placing the Okta middleware before the router. This is so the routes generated by Okta will take precedence over the sails router.
Expand Down

0 comments on commit 413107b

Please sign in to comment.