4,672 questions
1
vote
1
answer
349
views
Nextjs middleware exclude homepage from matcher
I'm checking user auth in the middleware and redirecting to a sign in page if not logged in. This works well but I want to exclude the middleware on the homepage which is the root of the site /. I ...
1
vote
1
answer
166
views
Is it needed to check the signed-in status of a user when my middleware does it, using clerk?
I am building a simple app with NextJs and Clerk.
I set up the middleware to protect all routes but some.
import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server';
const ...
0
votes
1
answer
113
views
How to Implement Custom Middleware for Segment Tracking in Angular to Modify Events Dynamically?
I want to implement custom middleware in my Angular application to modify Segment tracking events dynamically before they are sent. The goal is to filter, modify, or enrich events based on specific ...
0
votes
2
answers
316
views
Middleware.ts and .env.local is not working in Next.js with Clerk Integration
I'm Working in a project, while integration clerk with Next.JS. I found the middleware.ts and .env.local for secret keys are not working.
Click this to see directoryenter image description here
...
1
vote
1
answer
88
views
Chaining middlewares in Next js 14 for auth.js
I have a next js application which has multiple lingual support. So I have a middleware to redirect users to URL with the locale. I want to implement auth js in this application.
export function ...
0
votes
1
answer
373
views
Middleware in Next.js Only Works for the First Request from Client-Side Navigation
I'm working with Next.js and facing an issue where middleware is not being triggered on subsequent navigations from a client-side route. Specifically, I'm using router.push in a React component with ...
0
votes
0
answers
50
views
Laravel JWT middleware not detecting cookies despite being present in browser dev-tools
I'm working on a Laravel project where I'm using JWT (JSON Web Token) for user authentication. The authentication process seems to work correctly, as the JWT token is available in the browser's Dev ...
0
votes
1
answer
116
views
Is there a way to simultaneously change password for numerous user account simultaneously in IBM AS/400?
I am new to IBM AS400. Recently there is a need in my company to implement a 90 days password change for all users. The problem is some users won't change their password even if we already notify them ...
0
votes
1
answer
27
views
Token is Not Send
Here are my three files jwtToken.js jwtToken.js, middleware auth.js auth.js, and getUser get user. I want to get my user after registering the user but my code is showing the error of "Not token ...
-1
votes
1
answer
508
views
Clerk Middleware not functioning as intended
I just installed Next.js 14 for my project and wanted to setup the authentication with clerk before i start the project after setting up the middleware.ts and my layout.tsx file and running npm run ...
0
votes
2
answers
786
views
NextJS: Why NextResponse.redirect is not triggering on production
I want to implement a simple login flow. I have a login form that takes the user's phone and password. The credentials are sent to the API after submitting the form by calling the login function (...
0
votes
1
answer
215
views
Serving Static Files from Multiple Directories in ASP.NET Core - Unexpected Behavior
I’m working on an ASP.NET Core application and need to configure it to serve static files from multiple directories. I’m encountering unexpected behavior where files placed in the original wwwroot ...
1
vote
1
answer
62
views
Issue with Multer Middleware: Only Single File Not Being Processed Correctly in Express Application"
When using Multer in an Express application, if maxCount for file uploads is set to 1:
Expected Behavior: When a single file is uploaded, req.files should be populated with the file, and the ...
1
vote
1
answer
705
views
Understanding `UseExceptionHandler` in ASP.NET Core Web API
I have an exception handling middleware that looks like this:
public class ExceptionHandlerMiddleware : IExceptionHandler
{
public async ValueTask<bool> TryHandleAsync(HttpContext ...
0
votes
1
answer
196
views
How to Handle Hangfire with Dynamic Connection Strings Based on URL in ASP.NET Core 7 MVC Multi-Tenant Application?
I'm working on a multi-tenant ASP.NET Core 7 MVC application where each tenant has its own database. The connection string changes based on the URL, with each URL corresponding to a different tenant ...
0
votes
1
answer
61
views
Why would my parent route in express not pass down the req.params object to its child route? [duplicate]
I'm building an express application that has a users table in its database and a friends table. The point of the friends table is to be a many-to-many table that keeps track of friend requests between ...
-1
votes
2
answers
541
views
Combining Next-Intl and Supabase Middleware in Next JS Router
I have a NExt JS project using the app router with Supabase.
I have a ROOT middleware.js file that contains some supabase code. I also need to integrate Next-Intl middleware into this too and i'm not ...
0
votes
1
answer
67
views
Not working middleware tests (maybe my middleware were bad)
It my first middleware to verify tokens. It looks like this:
using System.IdentityModel.Tokens.Jwt;
using baio_api.Infrastructure.Services.Interfaces;
using Microsoft.Extensions.Logging;
namespace ...
1
vote
1
answer
489
views
.NET 8 Middleware Unexpectedly Changes Status Code to 204 After _next(context)
I am working on a .NET 8 Webapp. I have implemented a middleware to log requests and responses, but I'm facing an issue where the status code is unexpectedly changing from 200 to 204 after calling ...
1
vote
1
answer
467
views
Actix-Web JWT middleware
I'm building a web application using Actix-web and I'm trying to secure my endpoints with JWT (JSON Web Token) middleware. However, it seems that the middleware isn't working correctly, as my ...
1
vote
0
answers
291
views
Honojs with Vercel Middleware for Backend API
How can we use Vercel Middlware (https://vercel.com/docs/functions/edge-middleware/middleware-api) in a backend API developed using Hono for Vercel (https://hono.dev/docs/getting-started/vercel) ? I ...
0
votes
1
answer
136
views
Rails Custom Middleware not being recognized in GH CI
I'm using custom middle ware for the first time to normalize error handling. I have my middleware defined in app/middleware/error_handler.rb and using in my main application.rb
...
require_relative &...
0
votes
0
answers
186
views
Next JS 14 - Middleware redirect issue
"next": "14.2.4",
I try to use Next 14 middleware to handle auth.
When I trigger fetch on client with no/no valid cookie it goes to middleware and run validation.
If validation ...
1
vote
2
answers
1k
views
Laravel Middleware error: Argument #1 ($content) must be of type ?string, Illuminate\Routing\Redirector given
I have this middleware in my project, that sometimes, gives me some problems on my live server, and I don't know why, but just sometimes, and not all the times that it is triggered. This is the error:
...
0
votes
0
answers
106
views
ASP.NET Core Middleware doesn't redirect
I have the following custom middleware that sets the current culture info.
At the end, I want to redirect to another page, but my code isn't working.
In use, it seems like the execution stop's after ...