You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2020/05/27 06:19:38 UTC
[incubator-apisix-dashboard] branch next updated: feat: update
getAdminAPIConfig
This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git
The following commit(s) were added to refs/heads/next by this push:
new c769f83 feat: update getAdminAPIConfig
c769f83 is described below
commit c769f8322777e8d36e9e6ae8d8b5642b2a58de6e
Author: juzhiyuan <jj...@gmail.com>
AuthorDate: Wed May 27 14:19:01 2020 +0800
feat: update getAdminAPIConfig
---
src/app.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app.tsx b/src/app.tsx
index 70ce2e1..9971333 100644
--- a/src/app.tsx
+++ b/src/app.tsx
@@ -83,12 +83,12 @@ const errorHandler = (error: { response: Response; data: any }): Promise<Respons
return Promise.reject(response);
};
-const adminAPIConfig = getAdminAPIConfig();
+const { schema, host, path, prefix, key } = getAdminAPIConfig();
export const request: RequestConfig = {
- prefix: `${adminAPIConfig.schema}://${adminAPIConfig.host}${adminAPIConfig.path}${adminAPIConfig.prefix}`,
+ prefix: `${schema}://${host}${path}${prefix}`,
errorHandler,
credentials: 'same-origin',
headers: {
- 'X-API-KEY': adminAPIConfig.key,
+ 'X-API-KEY': key,
},
};