Skip to content
Snippets Groups Projects
Commit 8ac7392b authored by Mohammad Torkashvand's avatar Mohammad Torkashvand
Browse files

fix linting issue

parent e20687f3
Branches
Tags
2 merge requests!16Develop,!9Fix/nat 402 integrate with custom opa
Pipeline #85271 passed
......@@ -15,7 +15,7 @@ REACT_APP_OAUTH2_ENABLED=False
REACT_APP_OAUTH2_CLIENT_ID=
REACT_APP_OAUTH2_OPENID_CONNECT_URL=
REACT_APP_OAUTH2_SCOPE=
REACT_APP_OPA_BUNDLE_URL="http://localhost:8080/opa/bundles/policy.wasm"
REACT_APP_OPA_BUNDLE_URL=http://localhost:8080/opa/bundles/policy.wasm
# Needed because some libs misbehave
GENERATE_SOURCEMAP=false
......
window.__env__.REACT_APP_OPA_BUNDLE_URL = "${REACT_APP_OPA_BUNDLE_URL}";
window.__env__.OPA_BUNDLE_URL = "${REACT_APP_OPA_BUNDLE_URL}";
......@@ -6,10 +6,11 @@ export async function createPolicyCheck(user?: Partial<Oidc.Profile>) {
return () => true;
}
const opaBundletUrl = process.env.REACT_APP_OPA_BUNDLE_URL;
const opaBundletUrl = process.env.OPA_BUNDLE_URL;
if (typeof opaBundletUrl === 'undefined') {
throw new Error('REACT_APP_OPA_BUNDLE_URL is not defined');
console.log('OPA_BUNDLE_URL is not defined');
return () => true;
}
const policyResult = await fetch(opaBundletUrl);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment