Questions tagged [Middleware] (24)

0
answer

How to organize tokens (jwt) to react?

Use node.js + express. When authorizing the user to give accessToken and refreshToken. There is middleware on the Beck, to the test: const jwt = require("jsonwebtoken"); require("dotenv").config(); const { tokenValidate } = require("../helpers/validate"); authMiddleware function(req, res, next) { const authHeader = req.g...
adriana.Brekke79 asked April 8th 20 at 17:41
1
answer

How to apply the middleware directly to multiple addresses?

How to apply middleware to several addresses (one line):app.use('/path1/', function(req, res) {...}) app.use('/path2/', function(req, res) {...}) Meaning something like this:app.use(['/path1/', "/path2/"], function(req, res) {...}) Route is not suitable because at these locations in addition to middleware, tied another and ...
Harmony_Swift14 asked April 1st 20 at 18:01
0
answer

Module for structuring command bots for TELEGRAM, DEEP in, VK, etc. (like middleware system in express.js)?

For personal needs I decided to write a universal module for structuring command bots like in system middleware express.js. The idea itself is quite happened, but in the process had a few questions/wishes: 1. Looking for ready-made solutions for this purpose but suitable found. If anyone knows of modules which implement exa...
deonte23 asked March 31st 20 at 16:12
0
answer

Vue middleware securing routing?

Colleagues, welcome! Trying to figure out how in vue using middleware to protect the routing. ./router.jsspoiler/** * Vue Router * * @library * * https://router.vuejs.org/en/ */ // Imports the Lib import from Vue "vue" import Router from "vue-router" import Meta from "vue-meta" // Routes import paths from "./paths" imp...
Oscar.Thi asked March 27th 20 at 13:45
2
answers

Middleware or Controller?

What is the meaning of the use of intermediaries in the case that you need to check for example the Age, if less than 21 that redirect to the home page, if you can do just as well using the controller? The documentation shows this example with the mediators, but the sense I did not catch.
Darwin asked March 27th 20 at 13:15
2
answers

As in django python with the intermediate layer of middleware to modify page content before it is output render'ω in view?

https://docs.djangoproject.com/en/2.1/topics/http/... In reference specify which part of the code executes before, what after view. But nothing is said about how to customize the generated page content before it is output after the view.class SimpleMiddleware: def __init__(self, get_response): self.get_response = get_resp...
cecelia.Volkman asked March 25th 20 at 13:32
1
answer

Whether an example implementation of the middleware?

Whether an example implementation of the middleware? Test class middlewarespoilernamespace App\Middleware; use Engine\Core\Middleware\MiddlewareInterface; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; class Test implements MiddlewareInterface { public function handle(ServerRequestIn...
Forest.Bayer asked March 24th 20 at 12:09
0
answer

In nuxt.js to make nested folders in the middleware?

Is it possible to Nuxt.js to make nested folders in the middleware? If Yes, then how to use them for example to pages?#issue
meagan asked March 19th 20 at 19:05
0
answer

How to understand the topic of IPTV, and build IPTV network at home?

Hello! in order to educate themselves want to deal with the scheme of IPTV and build a homemade iptv-network - start a homemade stream for one or two personal TV. As I understand I will need a Middleware (from found free Stalker Middleware), and some "flow", which somehow is passed. What you can read on this subject? What a...
marina.Denesik2 asked March 17th 20 at 10:00
2
answers

How to create a Middleware for Django's authorization?

Decided to create a new thread and restate the question. How to implement a Middleware that all URLs in the project would require authorization 1. In the application create a file middleware.py in which a class of Middlewareclass MyAuthorization: def process_request(request): pass 2. In settings.py at the end of the list...
Amiya asked March 17th 20 at 09:15