Class: Rack::FlocOff

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/floc_off.rb

Overview

Turns off Federated Learning of Cohorts (FLoC) plausible.io/blog/google-floc

Defined Under Namespace

Classes: Railtie

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ FlocOff

Returns a new instance of FlocOff.



5
6
7
# File 'lib/rack/floc_off.rb', line 5

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



9
10
11
12
13
# File 'lib/rack/floc_off.rb', line 9

def call(env)
  status, headers, body = @app.call(env)
  headers['Permissions-Policy'] = 'interest-cohort=()'
  [status, headers, body]
end