Tag:middleware

  • Go | gin solves cross domain problems and cross domain configuration

    Time:2020-10-30

    <h1>Go | gin solves cross domain problems and cross domain configuration</h1> preface In the project of separating front end and back end, we often encounter cross domain problems. How to solve the problems?! 1、 About cross domain solutions Most of the cross domain solutions can be divided into two types Nginx reverse proxy solves cross […]

  • Basic process principle of Python Django 01

    Time:2020-10-30

    Basic process principle of Python Django The use of Django framework in Python 1、 Frame structure Project name fruitcar installdjangoThen execute the instruction django-admin startproject FruitCar The following directory structure is generated: Containers for the fruitcar project(You can rename it)Fruitcar contains your project, which is a pure Python package. Its name is the python package […]

  • Koa JWT documentation (machine retouching)

    Time:2020-10-28

    Koa-jwt node>=7.6.0 npm v3.2.2 This module allows you to authenticate HTTP requests in your koa application by using JSON web token (hereinafter referred to as JWT) This document gives a good introduction If you use koa version 2. +, and you have a node. Installation earlier than 7.6 [email protected] The koa JWT version 3 + […]

  • Micro course lesson 7 table of different splitting rules

    Time:2020-10-26

    https://v.youku.com/v_show/id… In the last issue, we introduced the complex query function. In this issue, we will continue to explain the tables with different splitting rules. Now I have four nodes, four nodes are divided by modulus, TB_ There are five pieces of data on mod. There is a bracket for 67, which means that if […]

  • I don’t have enough memory, but I have to find a file based cache

    Time:2020-10-26

    1: Background Story telling In 18 years, we encountered such a problem in the process of pure memory project. Because some core data is floating in memory, the memory space is extra precious for us. However, some data in the project need to be cached, such as the points on the report to be drilled […]

  • Redux is so simple

    Time:2020-10-25

    Redux is a JavaScript state container that providesPredictabilityState management of. What is predictability? My understanding is that according to a fixed input, there must be a fixed result. Redux is specially developed for react, but it is not only used for react, but can be used for any interface library. motivation With the popularity of […]

  • Analysis of connected react router

    Time:2020-10-25

    connected-react-routerThis library helps us realize thereduxThe routing method is operated in, and the route change information is synchronized in thereduxOfstoreMedium. Implementation process actionsencapsulationpush、replace、goAnd so on middlewareinterceptactionsInformation, trigger, packagedactionmethod reducernewly addedrouterState information for ConnectedRouterThe component monitors the route changes and updates the routing information to thestore Dependency library and directory structure Dependency Library history react-router directory […]

  • Nuxt

    Time:2020-10-24

    Server rendering Server knowledge: koa node.jsSSR principle:*Render the same components as server-side HTML strings, send them directly to the browser, and finally send these static tags to the browser“Live” is a fully interactive application on the client. *Response scenario: Need better SEO Faster content arrival time (screen rendering time) is required, especially for slow network […]

  • Laravel with JWT

    Time:2020-10-23

    The test was conducted using laravel version 5.5. install composer require tymon/jwt-auth=1.0.0-rc.5 to configure Build configuration php artisan vendor:publish –provider=”Tymon\JWTAuth\Providers\LaravelServiceProvider” php artisan jwt:secret Auth configuration <?php return [ … ‘defaults’ => [ ‘guard’ => ‘web’, ‘passwords’ => ‘users’, ], ‘guards’ => [ ‘web’ => [ ‘driver’ => ‘session’, ‘provider’ => ‘users’, ], //Using JWT ‘api’ […]

  • Touch your hand and ask you to handle cross domain with proxy

    Time:2020-10-22

    First of all, the cross domain problem should be encountered when the front end and the back end are separated. Last week, the new partners were not familiar with it, so I just wrote about it. Review it yourself. 1. What is cross domain Access to XMLHttpRequest at ‘https://XXX.com’ from origin ‘http://localhost:8080’ has been blocked […]

  • Larravel + JWT multi table (or multi user) authentication

    Time:2020-10-21

    Recently in uselaravel+jwtAuth authentication, just finished the user moduleThere is a problem: the background module is about to be written, and the two modules are designed with two user tables: user table and admin table. Larvel has multi-user authority authentication method, which JWT has never contactedThe first time I went to Google to search the […]

  • Comparison and analysis of Redux, KOA and express Middleware

    Time:2020-10-20

    If you haveexpress ,koa, reduxYou’ll find that they all haveMiddlewareThe concept of,middleware The idea of interceptor is to add some extra processing between a particular input and output without affecting the original operation. First contactmiddleware It is used on the server sideexpressandkoaLater, it extended from the server to the front end, and saw that it […]