Skip to content

Commit

Permalink
chore: remove legacy routes (#7810)
Browse files Browse the repository at this point in the history
  • Loading branch information
KenLSM authored Oct 28, 2024
1 parent 64e7d82 commit f4a1eed
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 1 addition & 6 deletions src/app/loaders/express/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ import url from 'url'
import config from '../../config/config'
import { FrontendRouter } from '../../modules/frontend/frontend.routes'
import * as IntranetMiddleware from '../../modules/intranet/intranet.middleware'
import {
LEGACY_MYINFO_ROUTER_PREFIX,
MYINFO_ROUTER_PREFIX,
} from '../../modules/myinfo/myinfo.constants'
import { MYINFO_ROUTER_PREFIX } from '../../modules/myinfo/myinfo.constants'
import { MyInfoRouter } from '../../modules/myinfo/myinfo.routes'
import { SgidRouter } from '../../modules/sgid/sgid.routes'
import { ApiRouter } from '../../routes/api'
Expand Down Expand Up @@ -124,8 +121,6 @@ const loadExpressApp = async (connection: Connection) => {
app.use('/singpass/.well-known/jwks.json', SpOidcJwksRouter)
// Registered routes with sgID
app.use('/sgid', SgidRouter)
// Use constant for registered routes with MyInfo servers
app.use(LEGACY_MYINFO_ROUTER_PREFIX, MyInfoRouter)
app.use(MYINFO_ROUTER_PREFIX, MyInfoRouter)

// Legacy frontend routes which may still be in use
Expand Down
2 changes: 0 additions & 2 deletions src/app/modules/myinfo/myinfo.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { spcpMyInfoConfig } from '../../config/features/spcp-myinfo.config'
* registered with MyInfo.
*/
export const MYINFO_ROUTER_PREFIX = '/mi'
// To support backwards compatibility with the old MyInfo router prefix
export const LEGACY_MYINFO_ROUTER_PREFIX = '/myinfo'

/**
* Path to be added after MYINFO_ROUTER_PREFIX for the login
Expand Down

0 comments on commit f4a1eed

Please sign in to comment.