Skip to content

Commit

Permalink
changed startsWith to substring
Browse files Browse the repository at this point in the history
  • Loading branch information
AnastasiiaSvietlova committed Sep 20, 2024
1 parent 1598295 commit 103674e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/delivery-xml-http-request/delivery.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = (client, win = window) => ({
req.setRequestHeader('Bugsnag-Api-Key', event.apiKey || client._config.apiKey)
req.setRequestHeader('Bugsnag-Payload-Version', '4')
req.setRequestHeader('Bugsnag-Sent-At', (new Date()).toISOString())
if (url.startsWith('https')) {
if (url.substring(0, 5) === 'https') {
req.setRequestHeader('Access-Control-Max-Age', 86400)
}
req.send(body)
Expand Down

0 comments on commit 103674e

Please sign in to comment.