Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: socketio/engine.io
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
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.
Loading
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 committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    24786e7 View 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://github.com/bmeck/node-cookiejar) from 2.1.2 to 2.1.4.
    - [Release notes](https://github.com/bmeck/node-cookiejar/releases)
    - [Commits](https://github.com/bmeck/node-cookiejar/commits)
    
    ---
    updated-dependencies:
    - dependency-name: cookiejar
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    6220d14 View commit details
    Browse the repository at this point in the history
  3. chore(release): 6.4.0

    darrachequesne committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    898bd1c View commit details
    Browse the repository at this point in the history
Loading