Skip to content

Commit db3f12f

Browse files
authored
Fix allow_insecure handling
This fixes the allow_insecure setting which was silently breaking all OPNsense API calls
1 parent d0b2f02 commit db3f12f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

action.d/opnsense.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ actionban = curl <_allow_insecure> -s -XPOST -d '{"address":"<ip>"}' -H "Content
5656
actionunban = curl <_allow_insecure> -s -XPOST -d '{"address":"<ip>"}' -H "Content-Type: application/json" -u "<key>":"<secret>" https://<firewall>/api/firewall/alias_util/delete/<alias>
5757

5858
# Internal variable handler for `allow_insecure`
59-
_allow_insecure = if [ '<allow_insecure>' = true ]; then echo ' -k '; fi;
59+
_allow_insecure = $(if [ '<allow_insecure>' = true ]; then echo ' -k '; else echo ''; fi;)
6060

6161
[Init]
6262

0 commit comments

Comments
 (0)