Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Rule sets attach to routes; rules pair match conditions (path patterns, hostnames, headers, query strings, request method, device and geography signals) with actions: URL redirect, URL rewrite, header add, append, or delete on both request and response, and cache configuration overrides, with server variables available for the dynamic compositions. The canonical uses map to requirements every estate has. Redirect consolidation: the apex to www decision, HTTP to HTTPS enforcement, the retired paths mapping to their successors with proper permanent codes, all executing at the edge in microseconds instead of waking an App Service to bounce a request. Rewrites decouple public URL shape from origin layout, the clean marketing path serving from the actual application route, the API version prefix mapping to backend pools, which buys refactoring freedom the monolith to services journeys from this series need. And the migration pattern that earns rules engine its keep: path by path cutover, the legacy origin serving everything except the paths rules route to the new platform, expanding weekly, the strangler pattern implemented in edge configuration instead of code.
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Rule sets attach to routes; rules pair match conditions (path patterns, hostnames, headers, query strings, request method, device and geography signals) with actions: URL redirect, URL rewrite, header add, append, or delete on both request and response, and cache configuration overrides, with server variables available for the dynamic compositions. The canonical uses map to requirements every estate has. Redirect consolidation: the apex to www decision, HTTP to HTTPS enforcement, the retired paths mapping to their successors with proper permanent codes, all executing at the edge in microseconds instead of waking an App Service to bounce a request. Rewrites decouple public URL shape from origin layout, the clean marketing path serving from the actual application route, the API version prefix mapping to backend pools, which buys refactoring freedom the monolith to services journeys from this series need. And the migration pattern that earns rules engine its keep: path by path cutover, the legacy origin serving everything except the paths rules route to the new platform, expanding weekly, the strangler pattern implemented in edge configuration instead of code.
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Rule sets attach to routes; rules pair match conditions (path patterns, hostnames, headers, query strings, request method, device and geography signals) with actions: URL redirect, URL rewrite, header add, append, or delete on both request and response, and cache configuration overrides, with server variables available for the dynamic compositions. The canonical uses map to requirements every estate has. Redirect consolidation: the apex to www decision, HTTP to HTTPS enforcement, the retired paths mapping to their successors with proper permanent codes, all executing at the edge in microseconds instead of waking an App Service to bounce a request. Rewrites decouple public URL shape from origin layout, the clean marketing path serving from the actual application route, the API version prefix mapping to backend pools, which buys refactoring freedom the monolith to services journeys from this series need. And the migration pattern that earns rules engine its keep: path by path cutover, the legacy origin serving everything except the paths rules route to the new platform, expanding weekly, the strangler pattern implemented in edge configuration instead of code.
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Rule sets attach to routes; rules pair match conditions (path patterns, hostnames, headers, query strings, request method, device and geography signals) with actions: URL redirect, URL rewrite, header add, append, or delete on both request and response, and cache configuration overrides, with server variables available for the dynamic compositions. The canonical uses map to requirements every estate has. Redirect consolidation: the apex to www decision, HTTP to HTTPS enforcement, the retired paths mapping to their successors with proper permanent codes, all executing at the edge in microseconds instead of waking an App Service to bounce a request. Rewrites decouple public URL shape from origin layout, the clean marketing path serving from the actual application route, the API version prefix mapping to backend pools, which buys refactoring freedom the monolith to services journeys from this series need. And the migration pattern that earns rules engine its keep: path by path cutover, the legacy origin serving everything except the paths rules route to the new platform, expanding weekly, the strangler pattern implemented in edge configuration instead of code.
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Rule sets attach to routes; rules pair match conditions (path patterns, hostnames, headers, query strings, request method, device and geography signals) with actions: URL redirect, URL rewrite, header add, append, or delete on both request and response, and cache configuration overrides, with server variables available for the dynamic compositions. The canonical uses map to requirements every estate has. Redirect consolidation: the apex to www decision, HTTP to HTTPS enforcement, the retired paths mapping to their successors with proper permanent codes, all executing at the edge in microseconds instead of waking an App Service to bounce a request. Rewrites decouple public URL shape from origin layout, the clean marketing path serving from the actual application route, the API version prefix mapping to backend pools, which buys refactoring freedom the monolith to services journeys from this series need. And the migration pattern that earns rules engine its keep: path by path cutover, the legacy origin serving everything except the paths rules route to the new platform, expanding weekly, the strangler pattern implemented in edge configuration instead of code.
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Rule sets attach to routes; rules pair match conditions (path patterns, hostnames, headers, query strings, request method, device and geography signals) with actions: URL redirect, URL rewrite, header add, append, or delete on both request and response, and cache configuration overrides, with server variables available for the dynamic compositions. The canonical uses map to requirements every estate has. Redirect consolidation: the apex to www decision, HTTP to HTTPS enforcement, the retired paths mapping to their successors with proper permanent codes, all executing at the edge in microseconds instead of waking an App Service to bounce a request. Rewrites decouple public URL shape from origin layout, the clean marketing path serving from the actual application route, the API version prefix mapping to backend pools, which buys refactoring freedom the monolith to services journeys from this series need. And the migration pattern that earns rules engine its keep: path by path cutover, the legacy origin serving everything except the paths rules route to the new platform, expanding weekly, the strangler pattern implemented in edge configuration instead of code.
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Rule sets attach to routes; rules pair match conditions (path patterns, hostnames, headers, query strings, request method, device and geography signals) with actions: URL redirect, URL rewrite, header add, append, or delete on both request and response, and cache configuration overrides, with server variables available for the dynamic compositions. The canonical uses map to requirements every estate has. Redirect consolidation: the apex to www decision, HTTP to HTTPS enforcement, the retired paths mapping to their successors with proper permanent codes, all executing at the edge in microseconds instead of waking an App Service to bounce a request. Rewrites decouple public URL shape from origin layout, the clean marketing path serving from the actual application route, the API version prefix mapping to backend pools, which buys refactoring freedom the monolith to services journeys from this series need. And the migration pattern that earns rules engine its keep: path by path cutover, the legacy origin serving everything except the paths rules route to the new platform, expanding weekly, the strangler pattern implemented in edge configuration instead of code.
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
The Front Door post in August established the global entry architecture; this follow up goes inside the rules engine, the per route logic that executes at the edge, because a surprising fraction of application plumbing, redirects, header policy, cache behavior, path rewrites, belongs at the edge and estates keep implementing it in application code where it costs a full round trip to the origin.
The Machinery
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Rule sets attach to routes; rules pair match conditions (path patterns, hostnames, headers, query strings, request method, device and geography signals) with actions: URL redirect, URL rewrite, header add, append, or delete on both request and response, and cache configuration overrides, with server variables available for the dynamic compositions. The canonical uses map to requirements every estate has. Redirect consolidation: the apex to www decision, HTTP to HTTPS enforcement, the retired paths mapping to their successors with proper permanent codes, all executing at the edge in microseconds instead of waking an App Service to bounce a request. Rewrites decouple public URL shape from origin layout, the clean marketing path serving from the actual application route, the API version prefix mapping to backend pools, which buys refactoring freedom the monolith to services journeys from this series need. And the migration pattern that earns rules engine its keep: path by path cutover, the legacy origin serving everything except the paths rules route to the new platform, expanding weekly, the strangler pattern implemented in edge configuration instead of code.
Headers and Cache as Policy
Security headers are the low effort hardening the WAF cannot do for you: HSTS, content type options, frame ancestors policy, referrer policy, applied uniformly by a response header rule at the edge, one place instead of every application’s middleware, and verified by the external scanners the security team already runs. Request side, the rules stamp the headers origins need, the true client IP forwarding conventions, the edge region for the geo aware logic, and strip the ones origins should never trust from outside. Cache overrides per route tune what the August post set globally: static assets to long TTLs with query string ignoring, the API routes to bypass, the semi static content, the product catalog, the pricing page, to short TTLs that absorb traffic spikes without staleness anyone notices, and the cache purge integration in the deployment pipeline flushing the paths a release changed, the detail that separates edge caching from edge staleness incidents.
Keeping It Reviewable
Edge logic’s failure mode is becoming the layer nobody remembers: the redirect that fights the application’s own redirect in a loop, the header rule masking a misconfiguration, the rewrite that makes the origin logs lie. The discipline is the series’ usual: rule sets in Terraform with names that state intent, a comment convention linking each rule to its requirement, the pull request as the change unit with the same review as application routing changes, and a staging Front Door profile where rule changes soak against the test suite (the Playwright machinery from November exercising the redirect and header matrix) before production. Observability closes it: the Front Door logs carry the rules engine’s decisions, so the KQL answering “which rule touched this request” exists, and the monthly review checks rule hit counts, retiring the zero hit rules the way the firewall post retires dead exceptions. The edge is application logic at planetary scale; version it, review it, and test it like it is, because it is.
Cheers
Osama
Leave a Reply