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:
@@ -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;
|
||||
Reference in New Issue
Block a user