Skip to content

Commit ccc5cc1

Browse files
[DURACOM-344] remove hardcoded paths
1 parent 0b8f28f commit ccc5cc1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

server.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ import {
5858
REQUEST,
5959
RESPONSE,
6060
} from './src/express.tokens';
61+
import { getForbiddenRoute, getPageNotFoundRoute, getPageInternalServerErrorRoute } from "./src/app/app-routing-paths";
6162

6263
/*
6364
* Set path for the browser application's dist folder
@@ -418,11 +419,11 @@ function cacheAndErrorStatusCheck(req, res, next) {
418419
* @param res
419420
*/
420421
function setRequestErrorStatus(req, res) {
421-
if (req.url === '/500') {
422+
if (req.url === getPageInternalServerErrorRoute()) {
422423
res.status(500)
423-
} else if (req.url === '/404') {
424+
} else if (req.url === getPageNotFoundRoute()) {
424425
res.status(404)
425-
} else if (req.url === '/403') {
426+
} else if (req.url === getForbiddenRoute()) {
426427
res.status(403)
427428
}
428429
}

0 commit comments

Comments
 (0)