StyraInc / opa-typescript-deprecated

MOVED, see README.md
https://styrainc.github.io/opa-typescript/
Apache License 2.0
6 stars 2 forks source link

OpaApiClient: fix request path hook to work with proxies #65

Closed srenatus closed 5 months ago

srenatus commented 5 months ago

Before, our workaround (in the hook) would fail to pick up an executePolicy call to a serverURL with a prefix, like https://your-unified-api-gateway/opa.

Now, it'll check if it finds "/v1/data/" anywhere in the request path, and adjusts it accordingly.

It would have been nicer if we had access to the serverURL's prefix, but that's not available in the hook, as far as I can tell.