Skip to content

Commit

Permalink
Remove swiftype headers
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonStoltz committed Jun 30, 2021
1 parent 91f253d commit 0c90fcf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as ElasticAppSearch from "@elastic/app-search-javascript";
import { version } from "../package.json";

import { adaptResponse } from "./responseAdapter";
import { adaptRequest } from "./requestAdapters";
Expand Down Expand Up @@ -67,10 +66,6 @@ class AppSearchAPIConnector {
...(hostIdentifier && { hostIdentifier: hostIdentifier }),
apiKey: searchKey,
engineName: engineName,
additionalHeaders: {
"x-swiftype-integration": "search-ui",
"x-swiftype-integration-version": version
},
...rest
});
this.beforeSearchCall = beforeSearchCall;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import adaptRequest from "./requestAdapter";
import adaptResponse from "./responseAdapter";
import request from "./request";
import { version } from "../package.json";

function _get(engineKey, path, params) {
const headers = new Headers({
"x-swiftype-integration": "search-ui",
"x-swiftype-integration-version": version
"x-swiftype-integration": "search-ui"
});

const query = Object.entries({ engine_key: engineKey, ...params })
Expand Down
6 changes: 1 addition & 5 deletions packages/search-ui-site-search-connector/src/request.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { version } from "../package.json";

export default async function request(engineKey, method, path, params) {
const headers = new Headers({
"Content-Type": "application/json",
"x-swiftype-integration": "search-ui",
"x-swiftype-integration-version": version
"Content-Type": "application/json"
});

const response = await fetch(
Expand Down

0 comments on commit 0c90fcf

Please sign in to comment.