Remove cors-anywhere example in favor of simple header change

Signed-off-by: Mauricio Martinez <mauricio.martinez@premise.com>
This commit is contained in:
Mauricio Martinez
2023-09-12 14:17:06 -06:00
parent 902ea9cb26
commit 03c9e4c570
+2 -4
View File
@@ -238,11 +238,9 @@ createApiFactory({
api: apiDocsConfigRef,
deps: {},
factory: () => {
// Overriding openapi definition widget to add cors-anywhere proxy
// Overriding openapi definition widget to add header
const requestInterceptor = (req: any) => {
// Adding cors-anywhere proxy to the request url
console.log(req);
req.url = "https://cors-anywhere.herokuapp.com/" + req.url;
req.headers.append('myheader', 'wombats');
return req;
};
const definitionWidgets = defaultDefinitionWidgets().map(obj => {