惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
Microsoft Azure Blog
Microsoft Azure Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog
Y
Y Combinator Blog
博客园_首页
有赞技术团队
有赞技术团队
博客园 - Franky
腾讯CDC
G
Google Developers Blog
Recent Announcements
Recent Announcements
博客园 - 【当耐特】
D
Docker
The GitHub Blog
The GitHub Blog
MyScale Blog
MyScale Blog
H
Help Net Security
Apple Machine Learning Research
Apple Machine Learning Research
A
About on SuperTechFans
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
V
V2EX
U
Unit 42
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学

Compliance Solutions for Websites, Apps and Organizations | iubenda

AI can build your website. It can't manage your consent. | iubenda Browser signals and machine-readable consent: what they are and what the EU’s Digital Omnibus could change California Consumer Privacy Act (CCPA): Complete Guide How to increase your cookie banner opt-in rates: 5 mistakes to fix today | iubenda DPO Newsletter: Global Data Protection & Privacy News (issue #153) Why your consent management setup is a marketing performance question Everything you need to know about GDPR The redesigned cookie banner and configurator What nobody tells you about handing over the company you built European marketers are betting on retention. Privacy could be the edge they’re not using yet. The 5 best alternatives to Didomi in 2026: Pros, cons, pricing, and comparison Looking back on 15 years: what iubenda's founder would tell his 2011 self | iubenda The best cookie policy generator in 2026 DPO Newsletter: Global Data Protection & Privacy News (issue #152) | iubenda What publishers should expect from the EU’s Digital Omnibus proposal Uncertainty is the biggest blocker to AI adoption in marketing | iubenda Everything AI app builders need to know about vibecoding and privacy compliance | iubenda Introducing 1-Click Embedding for Google Tag Manager The Essential Small Business Terms and Conditions Template: What You Need to Know Terms of Use Template | iubenda IAB Europe Raises Concerns Over GDPR Procedural Regulation Draft Report | iubenda Learn from HelloFresh's Costly Mistake: Ensure Compliance with iubenda | iubenda Understanding the Spanish DPA Guide on Audience Measurement Cookies | iubenda The Austrian Data Protection Authority's FAQs on Cookies and Privacy | iubenda DPO Newsletter: Global Data Protection & Privacy News (issue #127) | iubenda Microsoft Ensuring European Data Stays Within the EU Cloud Boundary | iubenda Businesses Beware: ICO’s Record £14.3m in Fines for Data Misuse in 2023 Understanding the Risks and Responsibilities of Model-as-a-Service Companies in AI Development Facebook's New “Link History” Feature: A Blend of Convenience and Surveillance? | iubenda OpenAI’s Strategic Move in the EU: Aligning with Data Privacy Regulations
How to prevent Ad blockers from reducing your cookie cons...
Juan Ruiz · 2022-11-11 · via Compliance Solutions for Websites, Apps and Organizations | iubenda

If you rely on personalized ads to monetize your website content, ad blockers can be an issue: they can block your cookie banner and thus disrupt the collection of cookie consents.

In this guide, we will show you how to set up a CDN reverse proxy with URL substitution, avoiding the consent rate on your website being affected, and how to cache cdn.iubenda.com on a custom domain ensuring full continuity in case of iubenda CDN problems. Let’s see how to do it! 👉

Important disclaimer

This document and the included configuration are intended for expert personnel only or any person in charge of administrating the infrastructure where the proxy is being installed.

They are not intended for someone not in charge of the networking or anyone attempting to find temporary solutions or workarounds, hoping it will “just work.”

Too many possible issues could arise in the interactions with all combinations of systems and software versions, settings, and other running components to build a comprehensive guide to cover them all.

Setting up a CDN Reverse Proxy

Instructions

This document provides instructions and configurations to set up an NGINX reverse proxy that:

  • Proxies static CDN contents towards cdn.iubenda.com from a custom URL
  • Does URL substitution in the served documents.
  • Does NOT forward the client IP with the usual headers X-Forwarded-For and X-Real-Ip
  • Serves cached assets in case the iubenda’s CDN runs into issues of any type.
Notes
  • Requires ngx_http_sub and ngx_http_proxy modules to be enabled. They are usually installed by default.
  • Use your domain of choice instead of cdn.customer.com in both server_name and sub_filter directives.
  • Add proper SSL configuration as required.
  • Make sure /tmp/cache exists and has the correct ownership: (i.e., chown nginx:nginx /tmp/cache), or change it to a location and file of choice.

Configuration Example

Important

Please note that the Privacy Controls and Cookie Solution native country detection (parameter countryDetection:true) won’t work with this configuration and the location of the end-user will always be considered as the one of the server where the reverse-proxy is installed is located.

If you are using different settings based on the location of your users, you will have to rely on your own geolocation system to load the correct configuration.

The configurations below are examples of a typical virtual host on Port 80. Configuration must be completed with SSL parameters, depending on the chosen settings.

# iubenda CDN local proxy configuration
# Version 1.1 - Included compression support

proxy_cache_path /tmp/cache levels=1:2 keys_zone=tmpcache:100m max_size=200m 
inactive=180m;

server {
  listen                      80;
  server_name                 cdn.customer.com;

  access_log                   /var/log/nginx/cdn-customer-access.log;
  error_log                    /var/log/nginx/cdn-customer-error.log;

  location / {
    # Link rewriting
    sub_filter 'cdn.iubenda.com' 'cdn.customer.com';
    sub_filter_types *;
    sub_filter_once off;
    
    # Enables compression
    gzip on;
    gzip_static off;

    # Enables cache for this location
    proxy_cache tmpcache;

    # Delivers cached stale files instead of relaying the error to the client.
    proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
    proxy_cache_background_update on;
    
    # Proxy cache valid for 30 min
    proxy_cache_valid 200 301 302 304 30m;
    proxy_pass https://cdn.iubenda.com/;
    proxy_set_header Accept-Encoding "";
  }
}

SDK Configuration Examples

If you’re using our SDK, in order to use your reverse proxy setup, you can follow these configuration examples:

For Android:

IubendaCMPConfig config = IubendaCMPConfig.builder() 
 .siteId("XXXXX") //use your siteId
 .cookiePolicyId("YYYYY") //use your cookiePolicyId
 .proxyUrl("https://iubenda.example-client-domain.com/cs/mobile.htm") //use your own reverse-proxy URL
 .build();

For iOS:

let config = IubendaCMPConfiguration()
config.siteId = "XXXXX" //use your siteId
config.cookiePolicyId = "YYYYY" //use your cookiePolicyId
config.proxyUrl = “https://iubenda.example-client-domain.com/cs/mobile.htm" //use your own reverse-proxy URL
IubendaCMP.initialize(with: config)

Please note that this configuration is available from version 2.6.0 of our SDK (for both Android and iOS).

Please reach out to us via email at business@iubenda.com if you need any further assistance or clarification. We’re happy to help.