-
Notifications
You must be signed in to change notification settings - Fork 332
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
Conversation
|
…into fix-cache-auth
@@ -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}/`, | |||
}, |
There was a problem hiding this comment.
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(); | ||
} |
There was a problem hiding this comment.
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.
New strategy for this. Let's parse
req.headers.cookie
directly with a server helper utility.Once #1713, we should updateis-request-authenticated
to usecookie.parse(...).jwt
.