Category "middleware"

Laravel same route for different middlewares

I have problem with routes and middlewares. I have 5 middleware roles. Administravimas, birstonas_biblioteka, druskininkai_biblioteka, birstonas_registratura,dr

Adding details in custom exception handling

I am currently developing a custom exception middleware and I also have my own exceptions. The goal is to be able to have a common library for multiple APIs and

While testing API containing pagination in postman facing skip value error

I am using pagination middleware in my node js project but while testing api in postman it's throwing error skip value Followed the paginate docs but still no u

How to create an Authentication middleware for a Flutter app?

This is my home.dart code and I want to write an Authentication Middleware for my app. At the moment my main.dart code looks like this: void main() { Get.put(

How to use JWT stored in cookie in NEXT _middleware

This question extends my last question and is primarily for me who might get stuck again. I'm trying to rebuild an app in Next.js that has this login form using

Does the position of error handling middleware matter in express?

I was just curious since I thought it wouldn't matter where you place the middleware in your code as long as it's in the app/index.js What I mean is this: const

Custom middleware breaks Developer Exception Page

Custom middleware breaks Developer Exeption Page. Instead of page with exception details there is HTTP 500 response. Debugging line by line runs only until awai

ASP.NET Core MVC app can't find error page?

I have an ASP.NET Core 3.1 MVC applications (not a Razor Pages project) and I'm trying to use the exception handling middleware via app.UseExceptionHandle("/err

Node js express error hanlding middleware dont recognize 4 elements

I'm trying to create an error-handling middleware, and as you can see in the image attached when I'm making the app.use((err,req,res,next) => {...}) block

Grouping routes in Express

We can group our routes like this in Laravel: Route::group("admin", ["middleware" => ["isAdmin"]], function () { Route::get("/", "AdminController@inde

React-Redux and Websockets with socket.io

I'm new with that technology React-Redux and I would like your help with some implementation. I want to implement one chat application with sockets (socket.io)

Reevaluate Nuxt.js middleware without a route change

I'm wondering if it's possible to essentially "reevaluate" the middleware conditions without actually changing the current route. The middleware's purpose is to

Laravel ServiceProvider vs. Middleware

I've got a question regarding Laravel. Where is the difference in using ServiceProviders or Middleware in Laravel? So I mean, when do I use ServiceProviders and

Passing variables to the next middleware using next() in Express.js

I want to pass some variable from the first middleware to another middleware, and I tried doing this, but there was "req.somevariable is a given as 'undefined'"

Django: How can I check the last activity time of user if user didn't log out?

django's User model has a last_login field, which is great if all the users were to log out each time they leave the site, but what if they don't? How can I tr

Use specific middleware in Express for all paths except a specific one

I am using the Express framework in node.js with some middleware functions: var app = express.createServer(options); app.use(User.checkUser); I can use the .

Use Middleware for some controllers

In my ASP Net Core application I need to apply a custom Middleware only for specific controller. I found this example app.UseWhen(context => context.Reques

Cant load a react app after starting server

(node:13176) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewa

Why do I get null auth user inside middleware?

The global middlewares, the ones which are run for every request on every route: protected $middleware = [ \App\Http\Middleware\CheckForMaintenanceMode

exit from express middleware with specific http status

Hopefully this is a simple one, but I have some custom middleware which I want to return a 404 or 401 etc to the user and stop the propagation of other handlers