ipfs-cluster/api/rest
Hector Sanjuan 322e87dd59 Restapi: Add configurable response headers
By default, CORS headers allowing GET requests from everywhere are
set. This should facilitate the IPFS Web UI integration with the
Cluster API.

This commit refactors the sendResponse methods in the API, merging
them into one as it was difficult to follow the flows that actually
send something to the client. All tests now check the presence of
the configured headers too, to make sure no route was missed.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-17 11:42:25 +02:00
..
client Add endpoints output: improvements and compliance 2018-10-04 00:57:36 +02:00
test Issue #162: Add tests for rest.Config 2017-10-19 20:49:18 +02:00
config_test.go Config: provide utility to parse duration arguments. Use it. 2018-03-16 14:22:11 +01:00
config.go Restapi: Add configurable response headers 2018-10-17 11:42:25 +02:00
restapi_test.go Restapi: Add configurable response headers 2018-10-17 11:42:25 +02:00
restapi.go Restapi: Add configurable response headers 2018-10-17 11:42:25 +02:00