Skip to content

Commit

Permalink
clean up + rm rejectUnauthorized
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierM committed Mar 22, 2021
1 parent cf2eb78 commit 3bb04dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

import { Logger } from '@kbn/logging';
import axios from 'axios';
import https from 'https';

import { ActionsConfigurationUtilities } from '../../actions_config';
import { getErrorMessage, request } from '../lib/axios_utils';
import { getBodyForEventAction } from './helpers';
import {
SwimlanePublicConfigurationType,
ExternalService,
Expand All @@ -19,10 +21,6 @@ import {
MappingConfigType,
} from './types';
import * as i18n from './translations';
import { getErrorMessage, request } from '../lib/axios_utils';
// import { ActionsConfigurationUtilities } from '../../actions_config';
import { getBodyForEventAction } from './helpers';
import { ActionsConfigurationUtilities } from '../../actions_config';

export const createExternalService = (
{ config, secrets }: ExternalServiceCredentials,
Expand All @@ -32,11 +30,7 @@ export const createExternalService = (
const { apiUrl: url, appId, mappings } = config as SwimlanePublicConfigurationType;
const { apiToken } = secrets as SwimlaneSecretConfigurationType;

const axiosInstance = axios.create({
httpsAgent: new https.Agent({
rejectUnauthorized: false,
}),
});
const axiosInstance = axios.create();

if (!url || !appId || !apiToken || !mappings) {
throw Error(`[Action]${i18n.NAME}: Wrong configuration.`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import React, { Fragment } from 'react';
import {
EuiButton,
EuiCallOut,
Expand All @@ -15,7 +13,8 @@ import {
EuiSpacer,
EuiText,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import React, { Fragment } from 'react';
import { FormattedMessage } from 'react-intl';
import * as i18n from '../translations';
import { StepProps } from './';
import { useKibana } from '../../../../../common/lib/kibana';
Expand Down Expand Up @@ -142,7 +141,6 @@ export const SwimlaneConnection: React.FunctionComponent<StepProps> = ({
<EuiFieldText
fullWidth
isInvalid={errors.apiToken.length > 0 && apiToken !== undefined}
// name="apiToken"
readOnly={readOnly}
value={apiToken || ''}
data-test-subj="swimlaneApiTokenInput"
Expand Down

0 comments on commit 3bb04dc

Please sign in to comment.