create middleware block and update proxy file also make token stored in cookes and up date user page to can show user details also fixed delete user error and delete car error and broken corse inginx image block now we can uplode image to server and but it in my app

This commit is contained in:
m7amedez5511
2026-06-17 17:01:53 +03:00
parent 6ca2cc08d1
commit a23d21f222
15 changed files with 1017 additions and 137 deletions

View File

@@ -1,17 +1,10 @@
// next.config.ts
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
async rewrites() {
return [
{
// كل طلب لـ /api/proxy/... يتحول لـ logiapi.slash.sa/api/v1/...
source: "/api/proxy/:path*",
destination: "https://logiapi.slash.sa/api/v1/:path*",
},
];
},
// No rewrites needed. All proxying is handled by
// app/api/proxy/[...path]/route.ts, which reads the HttpOnly auth cookie
// server-side and forwards it as a Bearer token to the backend.
};
export default nextConfig;