mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 22:45:25 +00:00
bugfix/useragent-header (#2979)
* add bruno-specific userAgent header * Update axios-instance.js --------- Co-authored-by: Linhart Lukáš <Lukas.Linhart@tescosw.cz> Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const axios = require('axios');
|
||||
const { CLI_VERSION } = require('../constants');
|
||||
|
||||
/**
|
||||
* Function that configures axios with timing interceptors
|
||||
@@ -12,6 +13,7 @@ function makeAxiosInstance() {
|
||||
|
||||
instance.interceptors.request.use((config) => {
|
||||
config.headers['request-start-time'] = Date.now();
|
||||
config.headers['user-agent'] = `bruno-runtime/${CLI_VERSION}`;
|
||||
return config;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user