zaproxy / zap-api-dotnet

ZAP Dot NET API
Apache License 2.0
35 stars 35 forks source link

Modifications to allow api to proxy via a docker container #10

Closed pkbfs closed 5 years ago

pkbfs commented 5 years ago

Hi,

This is in reference to the feature request I made here

https://github.com/zaproxy/zaproxy/issues/5473

Please bear with me I am new to git and github.

Cheers pkbfs

thc202 commented 5 years ago

The existing logic looks right to me, what needs to be changed is BuildZapRequestUrl to use the zap domain/host?

pkbfs commented 5 years ago

In that case zapAddress and zapPort variables are being used for two different purposes.

  1. To store the address and port of the zap daemon which in my example would be zapAddress : myzapdockercontainer.uksouth.azurecontainer.io zapPort : 8090 and are variables

  2. To store the api domain and port - 'zap' and 80 -- which are constants

So two new constants are needed - zapAPIDomain and zapAPIPort being the values 'zap' and 80?

thc202 commented 5 years ago

That looks right to me.

gmaran23 commented 5 years ago

Good code and good contribution. Thanks for improving OWASP ZAP.