f5devcentral / vscode-f5-chariot

Providing mobility from one tool to the other...
Apache License 2.0
8 stars 0 forks source link

Converting a endpoint policy that matches against the "type": "httpHost" condition forgets to add the property #15

Closed Spitfire1900 closed 1 month ago

Spitfire1900 commented 1 month ago
CGI-Privacy1-Rule {
            actions {
                0 {
                    http-reply
                    redirect
                    location https://www.example.com/privacy
                }
            }
            conditions {
                0 {
                    http-uri
                    values { /contact-us/privacypolicy }
                }
                1 {
                    http-host
                    values { www.example.com }
                }
            }

produces

{
    "name": "CGI-Privacy1-Rule",
    "remark": "XXXX",
    "conditions": [
        {
            "event": "request",
            "type": "httpUri",
            "all": {
                "values": ["/contact-us/privacypolicy"],
                "operand": "equals"
            },
        },
        {
            "event": "request",
            "all": {
                // "type": "httpHost", is missing
                "values": ["www.example.com"],
                "operand": "equals"
            },
        },
    ],
    "actions": [
        {
            "event": "request",
            "type": "httpRedirect",
            "location": "https://www.example.com/privacy"
        }
    ]
}
DumpySquare commented 1 month ago

Hi @Spitfire1900, thank you for opening this github issue. Unfortunately, this project only wraps the core ACC engine for use in VSCode. Looking at that repo, it seems they haven't updated it in a while and may have gone a different route. I suggest opening an issue there to get some feedback.

I will be closing this request since there is not much this particular project can do here.

https://github.com/f5devcentral/f5-automation-config-converter