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 broken user.auth() method on middleware.ts #1718

Merged
merged 7 commits into from
Jun 30, 2023
Merged

Conversation

alectrocute
Copy link
Contributor

@alectrocute alectrocute commented Jun 30, 2023

New strategy for this. Let's parse req.headers.cookie directly with a server helper utility. Once #1713, we should update is-request-authenticated to use cookie.parse(...).jwt.

@alectrocute
Copy link
Contributor Author

alectrocute commented Jun 30, 2023

Maybe we can do without the cookie dependency in #1713 as well. Food for thought.

@@ -111,9 +111,6 @@ const createClientConfig = (env, mode) => {
new ServiceWorkerPlugin({
enableInDevelopment: mode !== "development", // this may seem counterintuitive, but it is correct
workbox: {
modifyURLPrefix: {
"/": `/static/${env.COMMIT_HASH}/`,
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fixes a bad path with our service worker on production.

const user = UserService.Instance;
if (process.env.NODE_ENV !== "production") {
return next();
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's not cache anything on dev.

@alectrocute alectrocute added this to the 0.18.1 milestone Jun 30, 2023
@SleeplessOne1917 SleeplessOne1917 merged commit c8e3256 into main Jun 30, 2023
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.

2 participants