mirror of
https://github.com/OpenBankProject/API-Explorer-II.git
synced 2026-02-06 10:47:04 +00:00
feature/Enable API Explorer II for OBP API split portal/API mode
This commit is contained in:
parent
f27f27571c
commit
6c766fc651
@ -1,4 +1,12 @@
|
||||
VITE_OBP_API_HOST=https://apisandbox.openbankproject.com
|
||||
|
||||
### OBP-API mode ###################################
|
||||
# If OBP-API split to two instances, eg: apis,portal
|
||||
# Then API_Explorer need to set two api hosts: api_hostname and this api_portal_hostname, for all Rest Apis will call api_hostname
|
||||
# but for all the portal home page link, we need to use this props. If do not set this, it will use api_hostname value instead.
|
||||
VITE_OBP_API_PORTAL_HOST=https://apisandbox.openbankproject.com
|
||||
####################################################################################
|
||||
|
||||
VITE_OBP_API_VERSION=v5.1.0
|
||||
VITE_OBP_API_MANAGER_HOST=https://apimanagersandbox.openbankproject.com
|
||||
VITE_OBP_API_EXPLORER_HOST=http://localhost:5173
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "api-explorer",
|
||||
"version": "1.0.22",
|
||||
"version": "1.0.23",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite & ts-node server/app.ts",
|
||||
|
||||
@ -35,7 +35,8 @@ export default class OauthRequestTokenMiddleware implements ExpressMiddlewareInt
|
||||
constructor(private oauthInjectedService: OauthInjectedService) {}
|
||||
|
||||
use(request: Request, response: Response): any {
|
||||
const apiHost = process.env.VITE_OBP_API_HOST
|
||||
const apiHost = process.env.VITE_OBP_API_PORTAL_HOST || process.env.VITE_OBP_API_HOST;
|
||||
console.debug('OauthRequestTokenMiddleware - API Host:', apiHost);
|
||||
const oauthService = this.oauthInjectedService
|
||||
const consumer = oauthService.getConsumer()
|
||||
consumer.getOAuthRequestToken((error: any, oauthTokenKey: string, oauthTokenSecret: string) => {
|
||||
|
||||
@ -41,7 +41,7 @@ import { obpApiActiveVersionsKey, obpGroupedMessageDocsKey, obpMyCollectionsEndp
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const obpApiHost = ref(import.meta.env.VITE_OBP_API_HOST)
|
||||
const obpApiHost = ref(import.meta.env.VITE_OBP_API_PORTAL_HOST || import.meta.env.VITE_OBP_API_HOST);
|
||||
const obpApiManagerHost = ref(import.meta.env.VITE_OBP_API_MANAGER_HOST)
|
||||
const loginUsername = ref('')
|
||||
const logoffurl = ref('')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user