beforeXHR setRequestHeader not setting correct key/value


#1

I have a search configured as follows:

            $(".ui.search[type='compound']")
                .search({
                    minCharacters: 3,
                    localSearch: false,
                    apiSettings: {
                        url: '//puma.pfizer.com/molecularEntity/id/{query}?entityFormat=png%3A150_150&contentType=JSON',
                        beforeXHR: function (xhr) {
                            xhr.setRequestHeader('Authorization', 'Basic XXXXXXXXX');
                        },
                        onResponse: function (mssResponse) {
                            var response = {
                                    results: []
                                };
                            $.each(mssResponse.resultDataList, function (index, item) {
                                var maxResults = 8;
                                if (index >= maxResults) {
                                    return false;
                                }
                                response.results.push({
                                    title: item.returnedEntityId,
                                    description: item.source,
                                    image: item.content
                                });
                            });
                            return response;
                        }
                    }
                });

However, in my web debugging proxy the header is set as follows:

Access-Control-Request-Headers: authorization

Manually updating the header to

Authorization: Basic XXXXXXXXX

and resending works.

This is perplexing, especially since I’m following the example just like https://semantic-ui.com/behaviors/api.html#4-settings-returned-from-beforesend Any insight?