Referer Header is not included for requests in WKWebView

"The Referer header allows a server to identify referring pages that people are visiting from or where requested resources are being used. "

This header is never forwarded to server when the user is browsing the website in a WebView. This is properly maintained by other browsers but not in-app.

How do I include it?

Hi,

This is not explicitly supported in WKWebView. You can use the decidePolicy callback to update some information but nothing specific for modifying headers.

@Engineer This is supposed to be added by the browser itself: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referer.

Is there any policy that can be enabled for this in WKWebView since Safari has this or we should only use SFSafariViewController if that behavior is needed?

Referer Header is not included for requests in WKWebView
 
 
Q