Giter VIP home page Giter VIP logo

yii2-security-headers's People

Contributors

bicf avatar deepsourcebot avatar ivan-redooc avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

yii2-security-headers's Issues

Failed to load

Hi @bicf ,
I gave a try to your component, but it failed.
To make it load

I have changed 'on afterPrepare' => ['bicf\securityheaders\components\Response','modulesInit'],
to 'on afterPrepare' => ['bicf\securityheaders\components\Response','init'],

But then it failed also with the following errors:

An Error occurred while handling another error:
Error: Using $this when not in object context in vendor/yiisoft/yii2/web/Response.php:249
Stack trace:
#0 vendor/bicf/yii2-security-headers/src/components/Response.php(71): yii\web\Response::init()
#1 [internal function]: bicf\securityheaders\components\Response::init(Object(yii\base\Event))
#2 vendor/yiisoft/yii2/base/Component.php(627): call_user_func(Array, Object(yii\base\Event))
#3 vendor/yiisoft/yii2/web/Response.php(338): yii\base\Component->trigger('afterPrepare')
#4 vendor/yiisoft/yii2/web/ErrorHandler.php(135): yii\web\Response->send()
#5 vendor/yiisoft/yii2/base/ErrorHandler.php(111): yii\web\ErrorHandler->renderException(Object(Error))
#6 [internal function]: yii\base\ErrorHandler->handleException(Object(Error))
#7 {main}
Previous exception:
Error: Using $this when not in object context in vendor/yiisoft/yii2/web/Response.php:249
Stack trace:
#0 vendor/bicf/yii2-security-headers/src/components/Response.php(71): yii\web\Response::init()
#1 [internal function]: bicf\securityheaders\components\Response::init(Object(yii\base\Event))
#2 vendor/yiisoft/yii2/base/Component.php(627): call_user_func(Array, Object(yii\base\Event))
#3 vendor/yiisoft/yii2/web/Response.php(338): yii\base\Component->trigger('afterPrepare')
#4 vendor/yiisoft/yii2/base/Application.php(392): yii\web\Response->send()
#5 frontend/web/index.php(22): yii\base\Application->run()
#6 {main}

Is this working for you or it is just a matter of documentation?
In advance thanks for any hints.
EDIT:
Tried on Yii2 version 2.0.15.1 and 2.0.19 - Advanced Template
PHP 7.2.12

stable version

Hi @bicf,

is there a reason for not giving you package a stable version number yet ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.