WHY:
In some rare cases, a global variable is passed through as options of Fetch API. Then weasel modifies the type of headers in the parameter to Headers object during appending Instana correlation header. This case changes the type of a global variable and might cause conflict with further user cases.
Using a deep copy of options of Fetch and keeping the input one untouched is more safe.
WHAT:
Update hook of Fetch API to use deep copy of Fetch options.
WHY: In some rare cases, a global variable is passed through as options of Fetch API. Then weasel modifies the type of headers in the parameter to Headers object during appending Instana correlation header. This case changes the type of a global variable and might cause conflict with further user cases.
Using a deep copy of options of Fetch and keeping the input one untouched is more safe.
WHAT: Update hook of Fetch API to use deep copy of Fetch options.