Skip to content

Commit

Permalink
fix(EMS-3471): switched to req.headers.origin (#2608)
Browse files Browse the repository at this point in the history
Co-authored-by: Zain Kassam <zkassam@ukexportfinance.gov.uk>
  • Loading branch information
Zainzzkk and Zain Kassam authored Jun 19, 2024
1 parent e2b8523 commit 140f138
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/api/.keystone/config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('controllers/insurance/account/create/verify-email-expired-link', () =>

expect(sendEmailConfirmEmailAddressSpy).toHaveBeenCalledTimes(1);

const expectedUrlOrigin = `https://${req.headers.host}`;
const expectedUrlOrigin = `https://${req.headers.origin}`;

expect(sendEmailConfirmEmailAddressSpy).toHaveBeenCalledWith(expectedUrlOrigin, sanitisedId);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const post = async (req: Request, res: Response) => {
return res.redirect(PROBLEM_WITH_SERVICE);
}

const urlOrigin = `https://${req.headers.host}`;
const urlOrigin = `https://${req.headers.origin}`;

const sanitisedId = String(sanitiseValue({ value: id }));

Expand Down

0 comments on commit 140f138

Please sign in to comment.