I created an answer for HERE maps autocomplete API on Stack Overflow and I'm having an issue with the HTTP_REFERER
header not being sent when using Chrome browser (works fine w/ Edge and IE).
This causes an problem since the ajax call to the API returns 401 (unauthorized) in the code snippet. The API relies on the HTTP_REFERER
header as a means to prevent misuse.
Looking at the problem I noticed that the generated iframe
element doesn't have a src
attribute and that it appears that this is a known issue in Chromium.
Is there anyway to overcome this? Maybe add a dummy src
attribute set as https://stacksnippets.net/?