Global cookie parser (#5071)

* removed local cookie parser

* add global cookie parser

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
This commit is contained in:
Tomáš Petržela
2021-04-15 16:55:07 +02:00
committed by GitHub
parent 25e7daf433
commit 07b85b7eb7
3 changed files with 3 additions and 6 deletions

View File

@@ -6,7 +6,6 @@ import grant from 'grant';
import getEmailFromProfile from '../utils/get-email-from-profile';
import { InvalidPayloadException } from '../exceptions/invalid-payload';
import ms from 'ms';
import cookieParser from 'cookie-parser';
import env from '../env';
import { UsersService, AuthenticationService } from '../services';
import grantConfig from '../grant';
@@ -77,7 +76,6 @@ router.post(
router.post(
'/refresh',
cookieParser(),
asyncHandler(async (req, res, next) => {
const accountability = {
ip: req.ip,
@@ -126,7 +124,6 @@ router.post(
router.post(
'/logout',
cookieParser(),
asyncHandler(async (req, res, next) => {
const accountability = {
ip: req.ip,