Repository navigation
Home
Tal edited this page Oct 7, 2023
·
8 revisions
Welcome to the mstdn wiki!
-
webfingerエンドポイントは.well-known直下でないといけないのか
https://tex2e.github.io/rfc-translater/html/rfc7033.html
The path component of a WebFinger URI MUST be the well-known path "/.well-known/webfinger". A WebFinger URI MUST contain a query component that encodes the query target and optional link relation types as specified in Section 4.1.
-
単一のLambda関数に、/users/{id}/inbox, outbox, key は、API Gatewayから、/.well-known/webfinger はCloudFrontから飛ばすことができるか
- API Gateway経由でアクセスする場合、ベースPathとステージ名を同一にする制限でうまくいかない。.well-knownは、ドットが含まれておりステージ名にできない
- LambdaのWebエンドポイントを使う場合、可能だがエンドポイントが公開されてしまう
-
webfingerをActivityPub用lambda関数を呼び出すためのちょっとしたハック
- 通常の、Cloudfront, API Gateway, Lambda関数をセットアップする
- Lambda関数:割愛
- API Gateway: ステージ名を users に
- Cloudfront
- オリジンパス空白
- ビヘイビアパスパターン /users/* この時点で、/users/{id}/* は正常に処理される
- Cloudfront, API Gatewayに次の内容を追加する
- Cloudfront
- オリジンパス /users
- ビヘイビアパスパターン /.well-known/webfinger
- API Gateway
- Routesに /.well-known/webfinger を追加。IntegrationをLambda関数に
- Cloudfront
ブラウザで /.well-known/webfinger にアクセスすると、CloudfrontからAPI Gatewayには、 /users/.well-known/webfinger に変換される。 API Gatewayでは、 usersステージの /.well-known/webfinger にアクセスしたことになる。
- 通常の、Cloudfront, API Gateway, Lambda関数をセットアップする
-
デフォルトのエンドポイント
カスタムドメインを利用する場合は、無効にすることができる。CloudFrontを用いる場合は有効にする必要がある。