Phillip
Phillip
NNuxt
Created by Phillip on 6/28/2024 in #❓・help
appMiddleware in routeRules not working?
I was looking 2 hours for a solution––thank you 😄
7 replies
NNuxt
Created by Phillip on 6/28/2024 in #❓・help
appMiddleware in routeRules not working?
Alright–but it does the job in my case. Thank you!
7 replies
NNuxt
Created by Phillip on 6/28/2024 in #❓・help
appMiddleware in routeRules not working?
Thank you so much! I moved it into server/middleware and now it's being executed 🙂 And then if the user is for example not authorized I'd do something like this?
if (userNotAuthenticated) {
throw createError({ status: 401 })
}
if (userNotAuthenticated) {
throw createError({ status: 401 })
}
7 replies
NNuxt
Created by Phillip on 6/16/2024 in #❓・help
Private server routes
got it! You mean the server/utils directory, right? I will just go with that. Thank you
6 replies
NNuxt
Created by jwishnie on 3/30/2024 in #❓・help
Directory for utils for both Server and Client?
You have to import and re-export it. Like this /utils/buildTargetAudience.ts (client util)
import { buildTargetAudience } from '@/server/utils/buildTargetAudience'
export default buildTargetAudience
import { buildTargetAudience } from '@/server/utils/buildTargetAudience'
export default buildTargetAudience
2 replies
NNuxt
Created by Phillip on 3/27/2024 in #❓・help
Is there a way to prefetch the next page which has content that is being injected by javascript?
@L422Y thanks for your ideas! I'm having troubles to follow you quite frankly. I barely have used mutation observers but you mean I should listen to DOM changes? Or what should I observe?
Your solution would still mean that paymentElement.mount('#payment-element') needs to be run on /welcome/payment-method, correct? => meaning it'll still take a while before the form shows up for the user.
2 replies
NNuxt
Created by Phillip on 3/27/2024 in #❓・help
How to access the event in a server/utils function?
@kingtimm this worked perfectly, thank you!
3 replies
NNuxt
Created by Phillip on 6/11/2023 in #❓・help
How can I use tailwind @apply within a style tag?
@unai you are right! thank you
3 replies
NNuxt
Created by Phillip on 2/28/2023 in #❓・help
How to enforce redirecting to HTTPS?
@Fabian B. thank you so much!
4 replies