4,672 questions
0
votes
0
answers
39
views
Next.js Middleware Removing Cookies on Protected Routes (Works Locally)
This is my middleware.js file for the front end in Next.js. I want to create protected routes so that if a user doesn't have an access token, they are redirected to /. However, the cookies from the ...
0
votes
0
answers
701
views
Problem with PageSpeed Insights: RPC::DEADLINE_EXCEEDED
I have a problem with my portfolio site: https://www.frontendpolska.pl/pl.
I can't test the site in PageSpeed Insights—I keep getting the error:
RPC::DEADLINE_EXCEEDED: context deadline exceeded
or a ...
0
votes
0
answers
39
views
customize user in strapi v5
I am new to strapi
I am working on a user table that I wanted to have a discount code which is 8-digits like AKOF03SF for each user
that code would be generated when the user entry is created and it ...
2
votes
1
answer
134
views
Using Middleware and Prefix or any other parameter simultaneously in Route Groups
What I need is to use prefix() with Middleware simultaneously within Laravel.
For example this code:
Route::prefix('admin')->group(function () {
Route::get('/users', function () {
// ...
0
votes
0
answers
99
views
How to translate the not-found page in Next.JS
My website has translations, and I want to translate my error pages. But I translate my pages with a dynamic route (/app/[locale]) and not-found.tsx must be at the root (app/not-found.tsx). I don't ...
0
votes
0
answers
29
views
Why is request.user not being populated in Django when using custom JWT middleware?
I'm implementing custom JWT authentication in Django and I'm using middleware to decode the JWT token and assign request.user to the authenticated user. However, when I try to access request.user ...
0
votes
0
answers
114
views
POST /auth/v1/token?grant_type=refresh_token HTTP/1.1" 400 93 "-" "Next.js Middleware
Folks, I have spent days trying to figure out the error:
POST /auth/v1/token?grant_type=refresh_token HTTP/1.1" 400 93 "-" "Next.js Middleware
Basically, I have a nextjs web app ...
0
votes
1
answer
125
views
Role not Populating in Next-Auth JWT Token for Middleware Role-Based Access
I'm implementing role-based access control in a Next.js app using Drizzle ORM, Supabase (Postgres), and Auth.js. My middleware isn't receiving the user's role from the JWT token (request.auth.user....
3
votes
1
answer
115
views
404 URLs does not pass through web Middlewares in Laravel 11, php8.2 and TwillCMS
I have a redirect middleware. This middleware checks if the path is defined in our Redirection module table.
Normally, when a page exists (200) say http://localhost/existing-page, I can redirect the ...
1
vote
1
answer
89
views
Middleware for Dynamic Database URL Based on Subdomain in NestJS with Prisma
I’m working on a multi-tenant application using NestJS and Prisma. I want to dynamically set the databaseUrl based on the subdomain from my Next.js frontend. For example, if the subdomain is tenant1, ...
0
votes
1
answer
234
views
Overriding `/__open-in-editor` route in Vite + SvelteKit
There is a special route in Vite (+ SvelteKit) /__open-in-editor?file=SOURCE-FILE-PATH that opens the source file in an editor (like VS Code.)
Is it possible to override this route? I would like to ...
1
vote
0
answers
89
views
Why is my Node.js server returning a 404 error for valid routes? [duplicate]
I am building a Node.js server using Express, and I have defined a couple of routes like this:
const express = require('express');
const app = express();
app.get('/api', (req, res) => {
res.send(...
0
votes
0
answers
52
views
Unsupported type of value in Nextjs
I'm trying to know if a user is banned from my middleware and redirect it to a custom error page. The problems happens when I make the query to the DB from Drizzle ORM, I have created an async ...
0
votes
1
answer
57
views
Error when Validating Request Body in Rust Actix-Web
I am trying to implement a middleware function in an actix-web project. Here is the code for the middleware function, along with two helper functions:
pub async fn validation_middleware<B>(
...
0
votes
1
answer
95
views
Create middleware which rewrites headers and redirects url to API server
I'm attempting to make a middleware for making API calls to a separate server but failing to make a redirect/rewrite. Paths which starts with /api/proxy should be written without that prefix and route ...
1
vote
1
answer
50
views
Laravel 11 PersonalAccessToken can't find the token
I’m using Laravel Sanctum for API authentication, and I’m trying to check if a personal access token exists using the findToken method. However, it's always returning null even though I’m passing what ...
1
vote
1
answer
926
views
Removing 'Server' Header not working in ASP.NET Core 8 does not work with middleware or IIS Manager
I am trying to remove the Server Header from the HTTP response in my application.
I’ve seen quite a bit of information online and tried several things, but none have worked.
I’ve tried using the ASP....
0
votes
1
answer
247
views
how to fetch headers in middleware in Next js
In below NextJS code how can i access Authorization in middleware when client component call API every time api is call it show empty headers in middleware can some on explain it
Client Component:-
'...
0
votes
0
answers
34
views
Why I cannot access cookies in middleware in Nextjs
I have a middleware sitting between the client and /api/Blog/[id]/route.js async function GET(){...}
import { NextRequest, NextResponse } from "next/server";
import authenticate from "....
0
votes
0
answers
43
views
The extended Next-Auth session does not show the new attributes inside Next.js middleware
I'm building a Next.js(14.2.5) web app with Auth.js (Next-auth ^5.0.0-beta.20) for authentication and Prisma (client version 5.18.0) as an ORM. I have extended the session to include 2 extra ...
0
votes
0
answers
327
views
Clerk Middleware Causing Issues in Production, Works Fine Locally
Clerk middleware is causing issues on the production website, but works correctly in my local development build.
I need the middleware to lock the user on either the authentication page or the form ...
1
vote
0
answers
19
views
Laravel Passport $tokenResult is null, Alternative to Modifying vendor Folder for Rate-Limiting Middleware
I am using Laravel Passport for token authentication and facing an issue where $tokenResult is null. I suspect the default rate limit (throttle:60,1) is exceeded, so I temporarily modified the vendor\...
0
votes
1
answer
230
views
Integrate next-intl provided middleware with pre-existing middleware
I have an existing middleware that handles the auth.
Now i am trying to add the next-intl to my project. However i am having a hard time combining both of them.
I followed their tutorial and ...
3
votes
0
answers
567
views
Issue with fetch in Next.js middleware: [TypeError: fetch failed] with cause [Error: AggregateError] when calling localhost:3333
I'm encountering an issue when making a fetch request inside a middleware in my Next.js application. When I try to fetch data from localhost:3333, I get the following error: [TypeError: fetch failed] {...
0
votes
1
answer
85
views
How to change Oracle's Enterprise manager 12c runtime properties from a webservice call?
I work with Oracle SOA Suite (Oracle fusion middleware 12c and 11g), combined with weblogic 12c, Azure pipelines, git repository, and SOAtest from parasoft as testtool.
I want to be able to change ...