Skip to content

Cannot use the append_content_security_policy_directives method in ApplicationController #2445

@pvcresin

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/[email protected]
module SecureHeaders
  def append_content_security_policy_directives(additions); end
  # ...
end

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

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