Skip to content

Commit

Permalink
Merge pull request #167 from fingerprintjs/feature/remove-psl
Browse files Browse the repository at this point in the history
feat(proxy-host-header): add proxy host header, remove PSL
  • Loading branch information
ilfa authored Dec 14, 2023
2 parents 65d0dcf + 2f4a94e commit 2af1ddb
Show file tree
Hide file tree
Showing 21 changed files with 204 additions and 36,857 deletions.
5 changes: 0 additions & 5 deletions proxy/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ import {
getResultUri,
getStatusUri,
prepareHeadersForIngressAPI,
getHost,
getRegion,
getVersion,
getApiKey,
getLoaderVersion,
removeTrailingSlashes,
} from './utils'
import { getEffectiveTLDPlusOne } from './domain'
import { CustomerVariables } from './utils/customer-variables/customer-variables'
import { HeaderCustomerVariables } from './utils/customer-variables/header-customer-variables'
import { SecretsManagerVariables } from './utils/customer-variables/secrets-manager/secrets-manager-variables'
Expand Down Expand Up @@ -46,7 +44,6 @@ export const handler = async (event: CloudFrontRequestEvent): Promise<CloudFront
loaderVersion: getLoaderVersion(request, logger),
method: request.method,
headers: filterRequestHeaders(request),
domain: getHost(request),
logger,
})
} else if (resultPathMatches?.length) {
Expand All @@ -57,14 +54,12 @@ export const handler = async (event: CloudFrontRequestEvent): Promise<CloudFront
if (suffix.length > 0 && !suffix.startsWith('/')) {
suffix = '/' + suffix
}
const eTLDPlusOneDomain = getEffectiveTLDPlusOne(getHost(request))
return handleResult({
region: getRegion(request, logger),
querystring: request.querystring,
method: request.method,
headers: await prepareHeadersForIngressAPI(request, customerVariables),
body: request.body?.data || '',
domain: eTLDPlusOneDomain,
logger,
suffix,
})
Expand Down
Loading

0 comments on commit 2af1ddb

Please sign in to comment.