sdk: express - set x-client-ip instead

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-03-31 22:05:17 +02:00
parent df182d47ad
commit 4433b9f090

View File

@@ -25,7 +25,7 @@ export default function createMiddleware(options: OpenpanelOptions) {
const sdk = new OpenpanelSdk(options);
const ip = getClientIp(req);
if (ip) {
sdk.api.headers['x-forwarded-for'] = ip;
sdk.api.headers['x-client-ip'] = ip;
}
if (options.getProfileId) {