brave / brave-ios

Brave iOS Browser
https://brave.com
Mozilla Public License 2.0
1.7k stars 441 forks source link

Add Brave Ads status headers to search.brave.com #6024

Closed jsecretan closed 1 year ago

jsecretan commented 1 year ago

Description:

In preparation for Brave Ads on Brave Search, it is helpful for the Brave Search backend to understand whether the requesting browser has Brave Ads enabled. As such, we should add a header to any call to Brave Search (and its associated dev/staging environments), whether originating from the main search box or the Omnibox: X-Brave-Ads-Enabled should be set to 1 when Brave Ads is enabled on the device.

This issue may provide some guidance on the best way to accomplish that: https://github.com/brave/brave-ios/issues/887

tmancey commented 1 year ago

@brave/ios ok if I pick this up, or would you prefer to assign to somebody else? Thanks

iccub commented 1 year ago

go ahead @tmancey

tmancey commented 1 year ago

Updated https://github.com/brave/brave-browser/wiki/Custom-Headers

Uni-verse commented 1 year ago

Verified using version 1.45.2 (22.11.18.20) on the following device(s):

iPhone 12 Pro -iOS 16.x iPhone X - iOS 14.x iPads - iPadOS 16.x, 15.x

Clean Profile

Screen Shot 2022-11-23 at 11 17 22 AM

Ads Enabled

Screen Shot 2022-11-23 at 11 17 11 AM

Ads Disabled

Screen Shot 2022-11-23 at 11 18 27 AM