mahiro mahiro mahiro
Explore posts from serversWays to have local middleware inside server/
import { getServerSession } from "#auth";
import Cart from "~/server/models/cart.schema";
import mongoose from "mongoose";
const appConfig = useAppConfig();
export default defineEventHandler(async (event) => {
const session = await getServerSession(event);
if (!session) {
throw createError(appConfig.error.unauthorized);
}
currently this is my setup
7 replies
Ways to have local middleware inside server/
https://nuxt.com/docs/guide/directory-structure/server#server-utilities
is this what you mean?
7 replies
CDCloudflare Developers
•Created by mahiro mahiro mahiro on 1/20/2024 in #general-help
Caching on single page application
I think i found a way to do it
5 replies
CDCloudflare Developers
•Created by mahiro mahiro mahiro on 1/20/2024 in #general-help
Caching on single page application
which combine to only one question. Can I return the same file from the cache with different routes? Thank you in advanced!
5 replies
CDCloudflare Developers
•Created by mahiro mahiro mahiro on 1/20/2024 in #general-help
Caching on single page application
my idea is using wild card like example.com/* in page rule to do this
5 replies
CDCloudflare Developers
•Created by mahiro mahiro mahiro on 1/20/2024 in #general-help
Caching on single page application
Because from my belief everytimes it's being acess. it calls to this route in the backend. so when it's going through cloudflare will it knows that it did not have to fetch again from the backend
5 replies