sdk native: remove getting ip from client
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import { AppState, Platform } from 'react-native';
|
import { AppState, Platform } from 'react-native';
|
||||||
import * as Application from 'expo-application';
|
import * as Application from 'expo-application';
|
||||||
import Constants from 'expo-constants';
|
import Constants from 'expo-constants';
|
||||||
import * as Network from 'expo-network';
|
|
||||||
|
|
||||||
import type { MixanOptions } from '@mixan/sdk';
|
import type { MixanOptions } from '@mixan/sdk';
|
||||||
import { Mixan } from '@mixan/sdk';
|
import { Mixan } from '@mixan/sdk';
|
||||||
@@ -14,7 +13,6 @@ export class MixanNative extends Mixan<MixanNativeOptions> {
|
|||||||
constructor(options: MixanNativeOptions) {
|
constructor(options: MixanNativeOptions) {
|
||||||
super(options);
|
super(options);
|
||||||
|
|
||||||
this.api.headers['X-Forwarded-For'] = Network.getIpAddressAsync();
|
|
||||||
this.api.headers['User-Agent'] = Constants.getWebViewUserAgentAsync();
|
this.api.headers['User-Agent'] = Constants.getWebViewUserAgentAsync();
|
||||||
|
|
||||||
AppState.addEventListener('change', (state) => {
|
AppState.addEventListener('change', (state) => {
|
||||||
|
|||||||
@@ -24,8 +24,7 @@
|
|||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react-native": "^0.72.5",
|
"react-native": "^0.72.5",
|
||||||
"expo-application": "~5.3.0",
|
"expo-application": "~5.3.0",
|
||||||
"expo-constants": "~14.4.2",
|
"expo-constants": "~14.4.2"
|
||||||
"expo-network": "~5.8.0"
|
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"root": true,
|
"root": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user