aws / aws/serverless-java-container
Provide several Custom Domains and base paths
- 主要言語
- Java
- スター
- 1.6k
- フォーク
- 574
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
* Framework version: 1.3.2
* Implementations: Jersey
I have several different systems running my serverless container:
1. API Gateway + Lambda with Custom Domain Name at `https://api.myproject.com/v1/users/12345`
custom domain: `api.myproject.com`
base path: `v1/users`
2. API Gateway + Lambda with stage path (for testing development releases): https://ixov38idvk.execute-api.us-east-1.amazonaws.com/dev/users/12345
base path: `users`
3. SAM Local at `http://127.0.0.1:3000/users/12345`
base path: `users`
4. Local Tomcat instance for local testing
base path: `users`
So basically the base path changes from the production stage to all other deployments.
Could we then specify several base paths and the one that first matches is the one to be removed?
Also, I tried to return the URI of a created user with:
```java
URI uriLocation = uriInfo.getAbsolutePathBuilder().path(newUserUuid.toString()).build();
return Response.created(uriLocation).build();
```
But since the service base path was stripped, I get an invalid URI instead, such as `https://api.myproject.com/12345`, instead of `https://api.myproject.com/v1/users/12345`
Is it possible to re-inject the stripped path, so we can programatically get the full URI of the original HTTP Request?
コントリビューションガイド
調査の方向性
uriInfo.getAbsolutePathBuilder() の周辺で説明されている Jersey の URI 処理と、service base-path の除去動作から始めます。次に、API Gateway custom-domain、stage-path、SAM Local、Tomcat のケースを再現し、複数の base paths がある場合は最初の一致が使用され、作成されたリソースの URI が元のパスを保持することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- aws, java
- 領域
- api, backend, cloud
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100