Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lgtm-cat-apiのAPIGatewayにCORSの設定を追加 #73

Merged
merged 4 commits into from
Apr 3, 2022

Conversation

keitakn
Copy link
Member

@keitakn keitakn commented Mar 29, 2022

issueURL

#72

関連URL

なし

Doneの定義

  • lgtm-cat-apiがPreflightリクエストを受け取れるようになっている事

変更点概要

https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/http-api-cors.html のドキュメントに従い、OPTIONS /{proxy+} ルートを追加。

API側の OPTIONS ルートの設定は github.com/go-chi/cors を利用するようにした。対応PRは https://github.com/nekochans/lgtm-cat-api/pull/34

理由としてはローカル環境から将来的に作成されるであろう lgtm-cat-apiのローカルサーバーに通信する可能性もある為、そこでCORSのHeaderが設定されていないと結合して動作確認する際に不都合が発生すると判断した為。

レビュアーに重点的にチェックして欲しい点

関連PRを含めて方針問題ないか確認してもらえると:pray:

補足情報

本件は nekochans/lgtm-cat-frontend#146 の解決の為に実施している。

@keitakn keitakn self-assigned this Mar 29, 2022
Copy link
Member

@kobayashi-m42 kobayashi-m42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CORS有効化の対応もありがとう!
LGTMeow

@keitakn keitakn merged commit dc8472e into main Apr 3, 2022
@keitakn keitakn deleted the feature/issue72/add-cors-settings branch April 3, 2022 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants