A set of building blocks for instrumenting KrakenD gateways
Check the tests and the documentation for more details
You need to add an ExtraConfig section to the configuration to enable the CORS middleware. At least one option should be defined.
allow_originslist of strings (you can also use a wildcard, leaving it empty allows all origins too)allow_headerslist of stringsallow_methodslist of stringsexpose_headerslist of stringsallow_credentialsboolmax_ageduration (Ex: "12h", "5m", "3600s", ...)
"extra_config": {
"github_com/devopsfaith/krakend-cors": {
"allow_origins": [ "http://foobar.com" ],
"allow_methods": [ "POST", "GET"],
"max_age": "12h"
}
}
or leave the defaults (the defaults allows all origins):
"extra_config": {
"github_com/devopsfaith/krakend-cors": {
"allow_origins": []
}
}