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 ...
GlicyDev's user avatar
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 ...
Dev Ayush's user avatar
  • 143
0 votes
0 answers
109 views

My goal is to have a special route which receives name and payload for any other route and then (after doing some unpacking and decoding) call the target route which I prefer to go through HTTP ...
Ali Ebrahimi's user avatar
-4 votes
1 answer
64 views

I need want to send the only authenticated user to the /chat route in next js how to do ut using the middleware? Although I created a middleware and place it inside the root folder it dosen't detect ...
Sudam Ranasinghe's user avatar
2 votes
1 answer
118 views

This is the code below. I want to test a request coming in that has part of its path prefixed by external means. This middleware removes it before servicing the request. app = FastAPI( title="...
Kevin Piotrowicz's user avatar
0 votes
0 answers
38 views

I'm trying to follow the basic tutorial provided by NextJS to setup a middleware for my API. When trying to restrict origin (for testing purposes) to http://localhost:3000, the request.headers.get('...
Horkos's user avatar
  • 411
0 votes
0 answers
26 views

I understand that middleware functions in Express use the (req, res, next) signature and are added using app.use() But since a route handler also receives (req, res) or even (req, res, next), is it ...
muneeb malik's user avatar
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); }); ...
Tom's user avatar
  • 1,344
1 vote
0 answers
21 views

This setup only seems to work when I update or refresh my OpenAPI (Swagger) spec. When I call real API endpoints, apitallyRouter middleware doesn’t get triggered at all (no logs, no requests sent to ...
Doni Abdumutalibov's user avatar
0 votes
1 answer
216 views

I am using Laravel sanctum SPA auth to protect my routes/api.php routes. Instead of manually implementing the routes and controllers for authentication, I am using Laravel Fortify. Now Fortify adds ...
Nelize du Toit's user avatar
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 ...
Tejas's user avatar
  • 27
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 ...
sg_b's user avatar
  • 23
-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 ...
micahg's user avatar
  • 36
1 vote
1 answer
62 views

user redirected to login page after a trying to access a protected page. I am storing the protected page url in search params and after login redirect to that page. (my approach works on localhost ...
Mahadi Hasan's user avatar
0 votes
1 answer
80 views

I'm working on an ASP.NET Core web application with custom localization using JSON files. I'm trying to change the language at runtime and reflect it immediately in the current request. Here's what I ...
Soner Kochan's user avatar
0 votes
1 answer
63 views

I'm facing an issue in my Next.js 15 application. I am setting the jwtToken in the cookies when a user logs in. I have verified this through the browser's Application tab in the developer tools, where ...
Ali Ahmed's user avatar
0 votes
1 answer
44 views

after some work i found out that when using server actions to hit some route handler the session will be undefined because server actions run on the server without a request context from the browser, ...
aasem shoshari's user avatar
0 votes
1 answer
157 views

OBS: text translated with the help of AI I am trying to use a middleware in Next.js to rewrite the URL for a subdomain (like dividas.dominio.com) to /dividas. The behavior works correctly in the ...
Fernando Leão's user avatar
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'; ...
Dumb_Developer's user avatar
0 votes
0 answers
24 views

I have an Ubuntu image based docker container working as a development environment. Inside this container, I have my express app. Below are the code files. // Start the Express Server - index.ts ...
Aakash's user avatar
  • 33
0 votes
2 answers
56 views

I have an integration test using a WebapplicationFactory in .Net 9 to spin up the main Program.cs and hit endpoints. My problem is often an endpoint will return a generic 500 error when an unhandled ...
The Lemon's user avatar
  • 1,467
0 votes
0 answers
18 views

I have a confusing situation with NextJS and session cookies and middleware, the flows are: New user hits site -> middleware creates a new anon session token and sets the set cookie header in the ...
Rob Sanders's user avatar
  • 5,425
0 votes
0 answers
16 views

I have multiple middlewares at the same file, if user is not logged in; the auth middleware will redirect user to login page, the problem is even when user is logged in it will return login page ...
Aasem Shoshari's user avatar
0 votes
1 answer
55 views

I'm trying to authenticate using an identity provider that has its token endpoint on /profile/oidc/token instead of the usual /oauth/token endpoint. Is there any way to customize this? I'm always ...
BG931c's user avatar
  • 1
1 vote
2 answers
144 views

I am currently finalizing a payment system in my ReactJS - FastAPI web app, and I'm facing a problem. Indeed, I use stripe for payments and I use the stripe webhooks system to update the user infos in ...
Digicem's user avatar
  • 33

1
2 3 4 5
94