Elixir Tips

Elixir Tips

  • David Bernheisel

    dbernheisel

    Disable FLoC in Phoenix

    Want to disable Federated Learning of Cohorts (FLoC) in Phoenix Framework? https://web.dev/floc/ h/t to @mcrumm
    # my_app_web/router.ex
    
    defmodule MyAppWeb.Router do
      use MyAppWeb, :router
    
      pipeline :browser do
        # ...other plugs...
    
    
        plug :put_secure_browser_headers, %{"permissions-policy" => "interest-cohort=()"}
      end
    end
    10 upvotes