Giter VIP home page Giter VIP logo

Comments (4)

sts avatar sts commented on June 5, 2024

never tried to use pass by a header, wanna try using http-request set-var instead?

from coraza-spoa.

jvinolas avatar jvinolas commented on June 5, 2024

I've already tried with no success: It seems the filter is getting the 'raw' input request without any previous modifications done. As I want to use different configs for different paths I think the only way will be tu use acl in spoa. If you've got any other idea...

from coraza-spoa.

zc-devs avatar zc-devs commented on June 5, 2024

I tried to set a new header and try to get it into spoe app parameter without success

If you use event on-frontend-http-request, then works as intended:

Triggered just before the evaluation of http-request rules in a frontend

from coraza-spoa.

mamedin avatar mamedin commented on June 5, 2024

Using haproxy 2.8.9 I had to use proc.var_name instead of rtx.var_name. I wanted to use a variable for the app_name, based on hdr(host), so in frontend:

    # Define coraza app variable
    http-request set-var(proc.coraza_app) str(default_app)
    http-request set-var(proc.coraza_app) str(myapp_app) if { hdr(host) -i www.example.com }

In /etc/haproxy/coraza.conf:

 spoe-message coraza-req
    args app=var(proc.coraza_app) id=unique-id src-ip=src src-port=src_port dst-ip=dst dst-port=dst_port method=method path=path query=query version=req.ver headers=req.hdrs body=req.body
    event on-frontend-http-request

spoe-message coraza-res
    args app=var(proc.coraza_app) id=unique-id version=res.ver status=status headers=res.hdrs body=res.body
    event on-http-response 

It is working fine with proc.var_name but was failing using txn.var_name

from coraza-spoa.

Related Issues (20)

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.