3.58Configuring the Referer Referrer Address
Created on Aug 17, 2026~1 min read
When accessing certain third-party servers, the server may validate the Referer referrer address in the request headers. For example, when downloading images, an anti-hotlinking mechanism may be triggered, causing the obtained image to not match expectations. In that case, you can use the SetReferer method to set the Referer request header, simulating the source page to bypass hotlink protection.
HttpRequestBuilder.Get("https://furion.net/logo.png") .SetReferer("https://furion.net/"); // Forge a request originating from the homepageTo simplify configuration, the framework provides the built-in template string "{BASE_ADDRESS}", which automatically extracts the base address of the request address as the Referer:
HttpRequestBuilder.Get("https://furion.net/logo.png") .SetReferer("{BASE_ADDRESS}"); // Automatically replaces {BASE_ADDRESS} with https://furion.net/ when sending