Update curl command for setting policy
This commit is contained in:
parent
a49e2bcaad
commit
1f96171f62
1 changed files with 2 additions and 1 deletions
|
@ -224,7 +224,8 @@ const internalNginxOpenappsec = {
|
||||||
|
|
||||||
for (let port of ports) {
|
for (let port of ports) {
|
||||||
try {
|
try {
|
||||||
const command = `curl -s -o /dev/null -w "%{http_code}" ${constants.HOSTURL}:${port}/openappsec/set-apply-policy`;
|
const data = '{"policy_path":"/etc/cp/conf/local_policy.yaml"}';
|
||||||
|
const command = `curl -s -o /dev/null -w "%{http_code}" --data '${data}' ${constants.HOSTURL}:${port}/set-apply-policy`;
|
||||||
console.log(`command: ${command}`);
|
console.log(`command: ${command}`);
|
||||||
let { stdout } = await execPromise(command);
|
let { stdout } = await execPromise(command);
|
||||||
if (stdout === '200') {
|
if (stdout === '200') {
|
||||||
|
|
Loading…
Reference in a new issue