From 03c9e4c5704d0d64794d117e2fb362fa90d3b351 Mon Sep 17 00:00:00 2001 From: Mauricio Martinez Date: Tue, 12 Sep 2023 14:17:06 -0600 Subject: [PATCH] Remove cors-anywhere example in favor of simple header change Signed-off-by: Mauricio Martinez --- plugins/api-docs/README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/api-docs/README.md b/plugins/api-docs/README.md index 1f8a9b8db3..ceddab540a 100644 --- a/plugins/api-docs/README.md +++ b/plugins/api-docs/README.md @@ -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 => {