Permalink
base repository: socketio/engine.io
Failed to load repositories. Confirm that selected base ref is valid, then try again.
base: 6.3.1
Choose a base ref
...
head repository: socketio/engine.io
Failed to load repositories. Confirm that selected head ref is valid, then try again.
compare: 6.4.0
Choose a head ref
  • 3 commits
  • 7 files changed
  • 2 contributors

Commits on Feb 6, 2023

  1. feat: add support for Express middlewares

    This commit implements middlewares at the Engine.IO level, because
    Socket.IO middlewares are meant for namespace authorization and are not
    executed during a classic HTTP request/response cycle.
    
    A workaround was possible by using the allowRequest option and the
    "headers" event, but this feels way cleaner and works with upgrade
    requests too.
    
    Syntax:
    
    ```js
    engine.use((req, res, next) => {
      // do something
    
      next();
    });
    
    // with express-session
    import session from "express-session";
    
    engine.use(session({
      secret: "keyboard cat",
      resave: false,
      saveUninitialized: true,
      cookie: { secure: true }
    });
    
    // with helmet
    import helmet from "helmet";
    
    engine.use(helmet());
    ```
    
    Related:
    
    - #668
    - #651
    - socketio/socket.io#4609
    - socketio/socket.io#3933
    - a lot of other issues asking for compatibility with express-session
    @darrachequesne
    darrachequesne committedFeb 6, 2023
    Configuration menu
    Copy the full SHA
    24786e7View commit details
    Browse the repository at this point in the history
  2. chore(deps): bump cookiejar from 2.1.2 to 2.1.4 (#667)

    Bumps [cookiejar](https://.com/bmeck/node-cookiejar) from 2.1.2 to 2.1.4.
    - [Release notes](https://.com/bmeck/node-cookiejar/releases)
    - [Commits](https://.com/bmeck/node-cookiejar/commits)
    
    ---
    updated-dependencies:
    - dependency-name: cookiejar
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply..com>
    @dependabot
    dependabot[bot] authoredFeb 6, 2023
    Configuration menu
    Copy the full SHA
    6220d14View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    898bd1cView commit details
    Browse the repository at this point in the history
Loading