Skip to content
Snippets Groups Projects
Commit 47cedc30 authored by phriedrich's avatar phriedrich Committed by Diego Mello
Browse files

[FIX] Set the http-agent to the form that Rocket.Chat requires for logging (#1482)

parent 06730814
No related branches found
No related tags found
2 merge requests!32Android changes,!31Ios changes
import { Platform } from 'react-native';
import DeviceInfo from 'react-native-device-info';
export const headers = { 'User-Agent': `RC-RN Mobile/${ DeviceInfo.getVersion() } (build: ${ DeviceInfo.getBuildNumber() }; os: ${ Platform.OS } ${ DeviceInfo.getSystemVersion() })` };
// this form is required by Rocket.Chat's parser in "app/statistics/server/lib/UAParserCustom.js"
export const headers = { 'User-Agent': `RC Mobile; ${ Platform.OS } ${ DeviceInfo.getSystemVersion() }; v${ DeviceInfo.getVersion() } (${ DeviceInfo.getBuildNumber() })` };
export default (url, options = {}) => {
let customOptions = { ...options, headers };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment