File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,7 @@ const builtInPolicyMapping = {
44
44
*/
45
45
async function readPolicyFile ( policyPath : string ) : Promise < ArrayBuffer > {
46
46
try {
47
- return await fsp . readFile (
48
- path . join ( process . env . POLICY_DIR as string , policyPath )
49
- ) ;
47
+ return await fsp . readFile ( policyPath ) ;
50
48
} catch ( error ) {
51
49
_logger . error ( { error } , "Failed to read policy file" ) ;
52
50
@@ -106,7 +104,12 @@ export async function evaluatePolicyForRequest(
106
104
if ( config . POLICY === "custom" ) {
107
105
policyFile = await readPolicyFile ( config . POLICY_PATH ) ;
108
106
} else {
109
- policyFile = await readPolicyFile ( builtInPolicyMapping [ config . POLICY_TYPE ] ) ;
107
+ policyFile = await readPolicyFile (
108
+ path . join (
109
+ process . env . POLICY_DIR as string ,
110
+ builtInPolicyMapping [ config . POLICY_TYPE ]
111
+ )
112
+ ) ;
110
113
}
111
114
112
115
const policy = await loadPolicy ( policyFile ) ;
You can’t perform that action at this time.
0 commit comments