Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
現状この方法だと認証ができないため Draft
自分が開発をするときは本番環境で取得した
twinte_session
Cookie を手動でコピーしていた。背景
#601 での Service Worker の開発に必要になったため追加した。
現行の Readme に書いてある、拡張機能を用いた CORS エラーの回避方法はブラウザのページスクリプト内でのみ使えるので、それとは別のところで動いている Service Worker では使えない。
また拡張機能で CORS エラーを回避する方法は、拡張機能が使えるブラウザのみでしか使えない方法であり、また拡張機能の仕様変更に左右されてしまう。
さらに上記の拡張機能はブラウザのリクエストに介入して CORS ヘッダーを改竄しており、本番環境とことなる CORS ヘッダーとなるので、動作環境などで本番環境と差異がでる可能性がある。
したがって Service Worker の開発に限らず、拡張機能に依存しないで、本番環境となるべく近い動作する CORS エラーを回避できる手法がほしかった。
変更点
ローカルで立てるプロキシサーバを追加した。