Skip to content

Cannot use the append_content_security_policy_directives method in ApplicationController #2445

Description

@pvcresin

The append_content_security_policy_directives from SecureHeaders can be referenced in ApplicationController as follows:

class ApplicationController < ActionController::Base
  def foo
    append_content_security_policy_directives(xxxx)
  end
end

However, Sorbet seems unable to find append_content_security_policy_directives.

Method append_content_security_policy_directives does not exist on ApplicationController

By the way, the method is generated in RBI as follows:

# sorbet/rbi/gems/secure_headers@7.1.0.rbi
module SecureHeaders
  def append_content_security_policy_directives(additions); end
  # ...
end

Therefore, it's possible that ActionController and SecureHeaders are not linked correctly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help-wantedWe support this change, and welcome community contributions for it.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions