Skip to content

Commit be7fc51

Browse files
committed
Deploy test (on root)
1 parent b34d24c commit be7fc51

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

middleware.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { NextResponse } from 'next/server';
22

3-
// Note: Middleware runs on the Edge runtime, avoid Node-only libs like 'jsonwebtoken'.
4-
// We only check for the presence of a token and defer verification to API routes/pages.
3+
// Lightweight auth check for UI routes only; API routes verify JWT server-side.
54
export function middleware(req) {
65
const authHeader = req.headers.get('authorization');
76
const bearer = authHeader?.split(' ')[1];
@@ -15,7 +14,7 @@ export function middleware(req) {
1514
return NextResponse.next();
1615
}
1716

18-
// Protect specific routes
17+
// Only guard UI pages; do not guard /api/* here
1918
export const config = {
20-
matcher: ['/admin/:path*', '/register', '/api/events/:path*', '/api/blog/:path*'],
19+
matcher: ['/admin/:path*', '/register'],
2120
};

next.config.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ const nextConfig = {
99
domains: ["localhost", "csulb.acm.org"], // Add your domain here
1010
},
1111

12-
// Configure for subfolder deployment
13-
basePath: "/acm",
14-
assetPrefix: "/acm/",
12+
// Deploying at domain root (no basePath/assetPrefix)
1513

1614
// Webpack optimization for memory
1715
webpack: (config, { isServer }) => {

0 commit comments

Comments
 (0)