CodeGenieApp / CodeGenieApp/serverless-express

API Gateway with custom domain and base path returns 404

オープン
#397 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
5.3k
フォーク
676
PR マージ指標
30日以内にマージされた PR はありません

説明

Upgrading from version 3.x to 4.x (Using Koa framework)

Api Gateway + custom domain + base path `job`

Event is coming as :
```
{
"resource": "/{proxy+}",
"path": "/job/status",
...
"pathParameters": {
"proxy": "status"
}
...
}
```
It seems `pathParameters.proxy` value is taken and `ctx.url` is set to `/job` instead of `/job/status` which ends up with 404.

@brett-vendia Is this somehow related to - https://github.com/vendia/serverless-express/blob/4b5ca7a5e90c7709b25b8fada30e13a76ed5c651/src/event-sources/utils.js#L8

Is there any way this stripBasePath to be configurable ?

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with src/event-sources/utils.js at the referenced line and trace how pathParameters.proxy is used when building the Koa request URL. Reproduce the supplied API Gateway event with custom domain base path `job`; done means the `/job/status` request no longer returns 404 and the base-path stripping behavior can be configured as requested.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
aws, javascript, node.js
領域
api, backend, cloud
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。