@trezor/transport
Version:
Low level library facilitating protocol buffers based communication with Trezor devices
19 lines (18 loc) • 531 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.applyBridgeApiCallHeaders = applyBridgeApiCallHeaders;
const IS_NODE = typeof process !== 'undefined' && typeof window === 'undefined';
function applyBridgeApiCallHeaders({
headers,
contentType,
skipContentTypeHeader
}) {
if (IS_NODE) {
headers['Origin'] = 'https://wallet.trezor.io';
}
if (!skipContentTypeHeader) headers['Content-Type'] = contentType;
return headers;
}
//# sourceMappingURL=applyBridgeApiCallHeaders.js.map