Merge pull request #752 from trheyi/main
Refactor request guard to include page backend script execution
This commit is contained in:
commit
0ea400965d
1 changed files with 3 additions and 0 deletions
|
|
@ -311,6 +311,9 @@ func (r *Request) Guard(c *core.Cache) (int, error) {
|
|||
if c.GuardRedirect != "" {
|
||||
redirect := c.GuardRedirect
|
||||
data := core.Data{}
|
||||
// Here may have a security issue, should be refector, in the future.
|
||||
// Copy the script pointer to the request For page backend script execution
|
||||
r.Request.Script = c.Script
|
||||
if c.Data != "" {
|
||||
data, err = r.Request.ExecString(c.Data)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue