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

Fix nonexistent property req.cookies #1719

Merged
merged 1 commit into from
Jun 30, 2023
Merged

Conversation

alectrocute
Copy link
Contributor

In this PR:

  • Fix nonexistent property req.cookie from Enforce SameSite=Strict #1713.
  • Having no automated testing hurts with stuff like this. CI could have caught such a bug.

Thanks!

@@ -25,11 +25,15 @@ import { setForwardedHeaders } from "../utils/set-forwarded-headers";
export default async (req: Request, res: Response) => {
try {
const activeRoute = routes.find(route => matchPath(req.path, route));
let auth = req.cookies ? cookie.parse(req.cookies).jwt : undefined;

let auth = req.headers.cookie
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actual change here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's so strange! TypeScript told me it was there!

@alectrocute alectrocute changed the title Fix nonexistent property req.cookie Fix nonexistent property req.cookies Jun 30, 2023
@SleeplessOne1917 SleeplessOne1917 merged commit cf9f37f into main Jun 30, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants