[Chronik] Add -chronikcors
Summary:
Currently, if someone wants to use Chronik from a browser, they have to add an intermediary reverse proxy like NGINX (see here).
This adds the hidden -chronikcors flag, which allows users to connect to their instance directly (e.g. on localhost) without having to run a reverse proxy adding the CORS headers.
One example of this would be an app dev that wants to run a regtest instance locally and connect their webapp to that local regtest instance to try it out. Currently, this would throw CORS errors in all browsers with no mechanism to disable it in the browser, and devs would have to add a proxy locally to add those headers.
The option is hidden because we don't want users to enable it without care, as Chronik is intended to be run behind a reverse proxy (to e.g. add HTTPS or enforce rate limits).
Test Plan: ./test/functional/test_runner.py chronik_cors.py
Reviewers: Fabien, #bitcoin_abc, PiRK
Reviewed By: Fabien, #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D16077