Skip to content

Proxy mode does not work with @mockoon/serverless v9.4.0 #2033

@raymond-cc

Description

Describe the bug

I am running Mockoon in AWS Lambda. This bug does not happen when running Mockoon locally from the desktop app.

When an API request does not match a mock to Mockoon in proxy mode, it fails with a 404 error code instead of being passed to the proxy server.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>Error</title>
</head>

<body>
    <pre>Cannot GET /pokemon/pikachu</pre>
</body>

</html>

Here are the Mockoon logs for the sample Mockoon config. Note that even though the first request was a match, it still outputted `requestProxied: true:

{"app":"mockoon-server","environmentName":"Test","environmentUUID":"292be3e8-9226-4f3d-a0f7-694efaf301e0","level":"info","message":"Transaction recorded","requestMethod":"GET","requestPath":"?url=https%3A%2F%2Fgithub.com%2Fpokemon%2Fditto","requestProxied":true,"responseStatus":200,"timestamp":"2025-12-19T04:24:18.217Z"}
{"app":"mockoon-server","environmentName":"Test","environmentUUID":"292be3e8-9226-4f3d-a0f7-694efaf301e0","level":"info","message":"Transaction recorded","requestMethod":"GET","requestPath":"?url=https%3A%2F%2Fgithub.com%2Fpokemon%2Fpikachu","requestProxied":true,"responseStatus":404,"timestamp":"2025-12-19T04:24:23.829Z"}

Steps to Reproduce

  1. Run Mockoon in AWS Lambda using @mockoon/serverless@9.4.0
  2. Call Mockoon endpoint <host>/pokemon/ditto. Get "pokemon": "ditto" as response
  3. Call Mockoon endpoint <host>/pokemon/pikachu. Get 404 response as if request was not proxied.

Mockoon version:
@mockoon/serverless@9.4.0
This bug does not happen in 9.3.0.

OS / OS version:
AWS Lambda running NodeJS v20

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:lib-commons-serverIssue related to the @mockoon/commons-server libeffort:mediumModerate effort requiredpriority:lowNice-to-have features or minor issuesstatus:need-investigationMore investigation is required to decide if it's feasible

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions