From 9b157ca7b1c546a383403b295ead587a5dbc4d5a Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Thu, 28 May 2020 09:10:08 +0200 Subject: [PATCH] change header fauxapi pfsense --- apps/pfsense/fauxapi/custom/api.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/pfsense/fauxapi/custom/api.pm b/apps/pfsense/fauxapi/custom/api.pm index 0fcffae18..3df40575e 100644 --- a/apps/pfsense/fauxapi/custom/api.pm +++ b/apps/pfsense/fauxapi/custom/api.pm @@ -166,12 +166,14 @@ sub request_api { my ($self, %options) = @_; $self->settings(); + my $fauxapi_auth = $self->build_fauxapi_header(); my $content = $self->{http}->request( url_path => '/fauxapi/v1/?action=' . $options{action}, unknown_status => $self->{unknown_http_status}, warning_status => $self->{warning_http_status}, critical_status => $self->{critical_http_status}, - header => [ 'fauxapi-auth: ' . $self->build_fauxapi_header() ] + curl_backend_options => { header => ['fauxapi-auth:: ' . $fauxapi_auth] }, + lwp_backend_options => { header => [':fauxapi-auth: ' . $fauxapi_auth] } ); if (!defined($content) || $content eq '') {