Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
52 views

I want to pass the data from the NextJS middleware to the client component. I am using NextJS for the frontend, and an Express API for the backend. I could do it with X-Headers but what I want to send ...
1 vote
0 answers
21 views

I'm deploying a Bun + Express application to Vercel. Locally, my Express app works perfectly with routes defined in separate files and imported into index.ts. However, on Vercel, the deployment ...
12 votes
5 answers
17k views

I created middleware and add matcher /((?!api|_next/static|_next/image|favicon.ico|auth/login).*) in config middleware. When I try to run npm run dev.The result comes out like this: ImageError: Unable ...
Advice
0 votes
0 replies
46 views

I'm building an HR Management System using: Backend: Laravel Frontend: Next.js Authentication(SPA): Laravel Breeze (already set up for backend) I'm a beginner in Next.js, and I’m a bit stuck on how ...
1 vote
1 answer
79 views

I am doing unit testing for my project. This is the code I want to test: import { create } from "zustand"; import { persist } from "zustand/middleware"; interface LanguageState { ...
2 votes
1 answer
3k views

I am trying to run below command in shell script but i am getting error like: Error: Could not find or load main class weblogic.Admin ${SUN_JAVA_HOME}/bin/java -classpath $CLASSPATH weblogic.Admin -...
0 votes
1 answer
465 views

I want to develop many middlewares to be sure websites will parse. This is the workflow I think: First try with TOR + Polipo If 2 HTTP errors, try without TOR (so website know my IP) If 2 HTTP errors,...
7 votes
4 answers
19k views

My middleware class is in different class library project and controller is in different project. What I am trying to do, if specific condition does not meet then redirect to the Custom Controller/...
6 votes
1 answer
1k views

Thanks to the extensive ASP.NET Core documentation, we know what is happening at high-level but I also want to dive deep to understand what is exactly happening while built-in middlewares are ...
8 votes
5 answers
10k views

I am using Laravel Event Broadcast and Pusher to utilize websockets both on my API and Web. If I try them individually, both work fine. What I mean is: Broadcast::routes(['middleware' => 'web']); /...
2 votes
1 answer
134 views

I am intending to specify the single origins where I want my different endpoints to receive requests from. After looking at different options I thought that this might be the simplest way, and it ...
1 vote
2 answers
1k views

I want to define middleware in my Laravel project, this is my web.php file, when I try to check the auth, I get an error Route [login] not defined. Please help me define middleware in Laravel 11 in ...
91 votes
7 answers
188k views

I was wondering if anyone can compare/contrast the differences between frontend, backend, and middleware ("middle-end"?) succinctly. Are there cases where they overlap? Are there cases where they ...
1 vote
2 answers
125 views

I have this alias middleware which supposed to manually initialized the queries. exports.aliasTopTours = (req, res, next) => { req.query.limit = '5'; req.query.sort = '-ratingsAverage,price'; ...
0 votes
1 answer
372 views

I'm trying to save a stringified object in cookies within a middleware, but the value is being URL-encoded. For example, {name:123} turns into: %7Bname%3A123%7D. I don't encounter any issues when ...
2 votes
1 answer
172 views

I'm working on an ASP.NET Core Web API where I use session middleware with a configured idle timeout, e.g.: services.AddSession(options => { options.IdleTimeout = TimeSpan.FromMinutes(20); }); ...
3 votes
3 answers
4k views

I can't get the token data using getToken({req, secret}), always return null. Next JS 13.1.1 and next-auth 4.3.4 package.json: { "name": "frontend", "version": "...
-1 votes
1 answer
61 views

I'm sure this has been asked and answered, but maybe I'm not able to phrase it correctly to find the right results. Say I have two redux middleware operations: a call to create an asset entity in the ...
0 votes
1 answer
557 views

I'm using Laravel 11 and I'm trying to implement middleware. It gives out the above error but I am very certain it does exist. web.php Route::get('/admin', [App\Http\Controllers\HomeController::class, ...
1 vote
0 answers
139 views

I created authentications using Better-Auth and Google as the auth client. I have the correct URL for the authorized JavaScript origins and for the authorized redirect URL and I believe my set up is ...
1 vote
2 answers
820 views

How to correctly combine RequestValidationError exception handlers, such as: @app.exception_handler(RequestValidationError) async def validation_exception_handler(request, exc): response = ...
0 votes
1 answer
68 views

How to implement lazy initialization of authjs (v5 beta) config in nextjs 14 without encountering the error Error: The Middleware "/src/middleware" must export a middleware or a default ...
0 votes
0 answers
44 views

Ultimately, I want to route requests to pages within subdomains in my next.js application. If I specify the correct subdomain in a route, I believe that I need to have a middleware.ts file under the ...
42 votes
2 answers
67k views

I have read FastAPI's documentation about middlewares (specifically, the middleware tutorial, the CORS middleware section and the advanced middleware guide), but couldn't find a concrete example of ...
3 votes
1 answer
3k views

(I have asked this question before, and did find a way around which worked for a while, but soon got out of hand. So now I am looking for a perfect solution to achieve this, the Laravel way.) The ...

1
2 3 4 5
94