4,672 questions
0
votes
0
answers
46
views
Why is authorize not recognized in Nexus field configuration despite using fieldAuthorizePlugin?
I'm using Nexus with the fieldAuthorizePlugin to add an authorize function to my GraphQL schema fields for handling authentication. While everything works correctly at runtime (with @ts-ignore above ...
0
votes
0
answers
25
views
import model in next js middleware
i am developing a fullstack app with next js.
for authentication, I need import User model file in my middleware.ts but when I import this in middleware file, Next.js return this error to me
export ...
0
votes
1
answer
176
views
Durable Function with Global Exception Handler
We have a Durable Function with multiple orchestrators and activities. We would like to use a middleware as global exception handler instead of handling it in every orchestrator/activity. We can catch ...
0
votes
1
answer
35
views
Why my middleware is hanging up in nodejs?
Middleware for file upload...
// fileUpload.ts
import multiparty from 'multiparty';
import { Request, Response, NextFunction } from 'express';
import fs from 'fs';
import { InternalServerError } from '...
0
votes
0
answers
628
views
NextJS middleware keeps redirecting to localhost:3000 but I'm using 127.0.0.1:3000
I’m working on a project using Next.js middleware for authentication. My app runs on 127.0.0.1:3000, and the backend (FastAPI) is configured to set cookies for 127.0.0.1. Everything works fine until a ...
1
vote
1
answer
99
views
How to Use Nextjs Middleware Matcher Redirect Users
I want to redirect users in my nextjs middleware matcher from "admin" to "login" page, however the redirect doesn't work, i try to match the url with the "/admin" for ...
0
votes
1
answer
344
views
Single app.UseWhen vs multiple app.UseWhen
In ASP .NET Core app want to make one of my controllers sessionless. So I do the following:
app.UseWhen(
context => context.GetRouteValue("controller") is not "SomeValue",
app =&...
0
votes
1
answer
1k
views
Connect Spring Boot application to multiple Azure Event Hubs
So i have a SB app that is trying to integrate with a few event hubs to consume and also produce messages.
Reading the Microsoft documentation here i chose the Use Spring Messaging Azure Event Hubs ...
1
vote
0
answers
76
views
Middleware Fiber stopped working correctly after connecting logrus
I'm working on logging for a simple server. I have enjoyed using fiber middleware. It logs requests beautifully. Then the need to log code came up, so I hooked up logrus. But now my fiber logger only ...
0
votes
1
answer
177
views
Mixed-content issues
Is there anyone who has had the mixed-content issue, after having deployed a website. I have built an app that uses a Fastapi Backend deployed to Azure Web App and a frontend with NextJs 14 deployed ...
3
votes
1
answer
416
views
How can I use export in Next's output configuartion?
I'm using Clerk for authentication in my Next.js project, which has both static and dynamic routes.
However, I'm encountering an issue because my Clerk middleware file (middleware.ts) does not allow ...
-1
votes
2
answers
134
views
Next.js 14.x middleware.ts not triggering
I have a app/middleware.ts but it didn't trigger,
import { NextResponse, NextRequest } from 'next/server'
// This function can be marked `async` if using `await` inside
export function middleware(...
1
vote
1
answer
110
views
Is there a way to protect my global routes in laravel?
I have two different user roles ( admin, sales-admin)
I have created a middleware for each of them to see different views, and it works perfectly.
on the other hand, I have some public routes everyone ...
0
votes
2
answers
103
views
How the 2-way interaction between Redis and Rate-limiter will take place in this design
Given the diagram from Alexu Book of designing Rate-limiter.
I am wondering how the 2 way communication between Redis and rate limiter will take place.
The 2 way communication has been shown using ...
2
votes
0
answers
44
views
How to improve Extensibility of adding sub-middleware in traefik custom middleware
I'm working on a custom middleware for traefik that serves as a base for other sub-middlewares.
Each sub-middleware implements an interface and has its own config structure. Here's an outline of my ...
2
votes
1
answer
99
views
How to structure TypeScript event shapes to allow for event-specific middleware arguments?
I am working on an event-driven application framework that leverages a middleware pattern to process events dispatched from my service to third party applications. My service models many different ...
0
votes
0
answers
107
views
How do I know if an error was handled in a .catch() block when using rtk-query middleware?
I use rtk-query and I have a mutation query. After the query is executed, some actions are performed in the .then() block and then the error is processed in .catch().
Also, a middleware is written ...
0
votes
1
answer
47
views
Append redirect_url as query param to login URL through Nuxt Route Middleware
Suppose a user lands on an auth-protected page (say http://localhost:3000/member/profile), my nuxt-base app uses the following middleware to redirect the user to the /login URL:
export default ...
2
votes
1
answer
846
views
Unable to retrieve user email from clerk middleware
I have a table in supabase called Users which needs email and authId.I want to update these user data from the clerk. However, I am not able to retrieve the email address from the clerk's middleware. ...
0
votes
1
answer
56
views
Mongoose middleware "remove" does not work
I am using mongoose. I have two models: user and trophies. When I delete user, I want to delete all of its trophies. I am following mongoose library and I have code like it, but it does not work:
...
1
vote
1
answer
490
views
Dynamic refresh and access token updating. ASP.NET Core 8
I want to update my access and refresh tokens in my backend using middleware. When I send a request to my API, I take the token from the context and add it to the authorization header.
services....
1
vote
1
answer
746
views
Redirect to login if not authenticated using Next.js middleware
i'm trying to redirect to the login page if my token is undefined however the login page is not showing i think there is a problem with my condition or my matcher
This is my function
export async ...
-1
votes
3
answers
766
views
Target class [admin] does not exist. Laravel 11
I'm new to coding and I'm currently working on a project where I'm encountering an error that's preventing me from moving forward. Note that I had to add the Kernel.php file manually because it did ...
0
votes
0
answers
20
views
laravel middleware cannot read Auth
I have this middleware to change the application's language based on the user's language:
public function handle(Request $request, Closure $next): Response
{
if (Auth::check()) {
...
1
vote
1
answer
331
views
How to extend NextRequest (to add an "auth" property)
I'm using nextjs14 (App Router) with stacked middleware for localization and authentication. For auth, I'm using next-auth v5, and I'm unable to access auth in the Request object.
The same code works ...