Skip to content
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

Upgrade to express 5 #4664

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion api/middlewares/parse-form.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { urlencoded } = require('express');

const parseForm = urlencoded({
extended: false,
limit: '1kb',
});

Expand Down
6 changes: 1 addition & 5 deletions api/routers/build-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ const router = require('express').Router();
const BuildLogController = require('../controllers/build-log');
const { sessionAuth } = require('../middlewares');

router.get(
'/build/:build_id/log(/offset/:offset)?',
sessionAuth,
BuildLogController.find,
);
router.get('/build/:build_id/log{/offset/:offset}', sessionAuth, BuildLogController.find);

module.exports = router;
2 changes: 1 addition & 1 deletion api/routers/build-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ router.post(
router.put('/tasks/:build_task_id/:token', BuildTaskController.update);
router.get('/tasks/types', sessionAuth, BuildTaskTypeController.list);
router.get('/tasks/default-rules', sessionAuth, BuildTaskTypeController.getDefaultRules);
router.get('/tasks/:task_id/report/:sub_page?', sessionAuth, BuildTaskController.report);
router.get('/tasks/:task_id/report/{:sub_page}', sessionAuth, BuildTaskController.report);

module.exports = router;
6 changes: 3 additions & 3 deletions api/routers/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ router.get('/', MainController.home);
router.get('/system-use', MainController.systemUse);

// add csrf middleware to app route so that we can use request.csrfToken()
router.get('/organizations(/*)?', csrfProtection, MainController.app);
router.get('/sites(/*)?', csrfProtection, MainController.app);
router.get('/organizations{/*splat}', csrfProtection, MainController.app);
router.get('/sites{/*splat}', csrfProtection, MainController.app);
router.get('/settings', csrfProtection, MainController.app);

router.get('/robots.txt', MainController.robots);

router.options('(/*)?', (_req, res) => res.notFound());
router.options('{/*splat}', (_req, res) => res.notFound());

module.exports = router;
2 changes: 1 addition & 1 deletion api/routers/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ const MainController = require('../controllers/main');
const { csrfProtection } = require('../middlewares');

// add csrf middleware to app route so that we can use request.csrfToken()
router.get('/report(/*)?', csrfProtection, MainController.report);
router.get('/report{*splat}', csrfProtection, MainController.report);

module.exports = router;
4 changes: 2 additions & 2 deletions docker-compose.uaa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
dockerfile: ./Dockerfile-uaa
context: .
ports:
- 9000:8080
- 9001:8080
environment:
POSTGRES_DB: federalist
POSTGRES_PORT: 5432
Expand All @@ -19,4 +19,4 @@ services:
POSTGRES_PASSWORD: password
depends_on:
- db
command: ["/tomcat/bin/catalina.sh", "run"]
command: ["/tomcat/bin/catalina.sh", "run"]
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
NODE_ENV: development
PORT: 1337
PRODUCT: pages
UAA_HOST: http://localhost:9000
UAA_HOST: http://localhost:9001
UAA_HOST_DOCKER_URL: http://uaa:8080
USER_AUDITOR: federalist
CLOUD_FOUNDRY_API_HOST: https://api.example.com
Expand Down Expand Up @@ -68,7 +68,7 @@ services:
UAA_CLIENT_ID: pages-client
UAA_CLIENT_SECRET: client-secret
UAA_HOST_DOCKER_URL: http://uaa:8080
UAA_LOGIN_HOST: http://localhost:9000
UAA_LOGIN_HOST: http://localhost:9001
admin-client:
build:
dockerfile: ./admin-client/Dockerfile-admin
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"db-migrate-pg": "^1.5.2",
"deep-extend": "^0.6",
"eslint-plugin-react-hooks": "^4.6.0",
"express": "^4.19.2",
"express": "^5.0.1",
"express-rate-limit": "^5.2.3",
"express-session": "^1.18.0",
"express-slow-down": "^1.4.0",
Expand Down
Loading
Loading