프록시 구성(Node.js)
마지막 업데이트: 2024년 7월 20일
- 주제:
- APIs/SDKs
작성 대상:
- 개발자
노드 SDK의 HTTP 요청에 대한 프록시를 구성하려면 초기화하는 동안 SDK에서 사용한 가져오기 API를 재정의합니다.
다음은 프록시를 추가하기 위해 TargetClient
을(를) 초기화하는 동안 fetchApi
을(를) 재정의하는 방법을 보여주는 기본 예입니다.
const { ProxyAgent } = require("undici");
const proxyAgent = new ProxyAgent("your proxy address here");
const fetchImpl = (url, options) => {
const fetchOptions = options;
fetchOptions.dispatcher = proxyAgent;
return fetch(url, fetchOptions);
};
client = TargetClient.create({
...,
fetchApi: fetchImpl
});
이 기능은 노드 버전 18.2+에서만 작동하며, 여기서 undici.fetch
은(는) 노드의 기본 fetch
입니다.
노드 SDK 샘플 저장소를 방문하십시오.
프록시 구성 예제를 참조하십시오.
Target
- Adobe Target 개발자 안내서
- 시작
- 클라이언트측 구현
- 개요: 클라이언트측 웹용 Target 구현
- Adobe Experience Platform Web SDK 구현 개요
- at.js 구현
- at.js 개요
- at.js 작동 방식
- at.js를 배포하는 방법
- 온디바이스 의사 결정
- at.js 함수
- at.js 함수 개요
- adobe.target.getOffer()
- adobe.target.getOffers() - at.js 2.x
- adobe.target.applyOffer()
- adobe.target.applyOffers() - at.js 2.x
- adobe.target.triggerView() - at.js 2.x
- adobe.target.trackEvent()
- mboxCreate() - at.js 1.x
- targetGlobalSettings()
- mboxDefine() 및 mboxUpdate() - at.js 1.x
- targetPageParams()
- targetPageParamsAll()
- registerExtension() - at.js 1.x
- sendNotifications() - at.js 2.1
- at.js 사용자 지정 이벤트
- Adobe Experience Cloud Debugger를 사용하여 at.js 디버그
- Target에서 클라우드 기반 인스턴스 사용
- at.js FAQ
- at.js 버전 세부 사항
- at.js 1.x에서 at.js 2.x로 업그레이드
- at.js 쿠키
- 사용자 에이전트 및 클라이언트 힌트
- 글로벌 mbox 이해
- 서버 측 구현
- 하이브리드 구현
- Recommendations 구현
- 모바일 앱 구현
- 전자 메일 구현
- API 안내서
- 구현 패턴