-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proxy through the console instead of our own separate service.
- Loading branch information
1 parent
e6ac053
commit 9be9125
Showing
9 changed files
with
43 additions
and
64 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import { consoleFetch } from '@openshift-console/dynamic-plugin-sdk'; | ||
|
||
// make requests to our reverse proxy instead of directly to the CrowdStrike API, since it doesn't | ||
// support arbitrary CORS | ||
export default function proxiedFetch(url, options) { | ||
const proxyBase = window.location.origin.replace( | ||
'console-openshift-console', | ||
'api-gateway-falcon-openshift-console-plugin', | ||
); | ||
const proxyBase = '/api/proxy/plugin/falcon-openshift-console-plugin/reproxy/crwdapi'; | ||
const path = url.substr(url.indexOf('.com') + 4); | ||
return fetch(proxyBase + path, options); | ||
return consoleFetch(proxyBase + path, options); | ||
} |