SamVerschueren / ngx-api-gateway-client

AWS API Gateway Client for Angular
MIT License
8 stars 2 forks source link

Use custom domain names #11

Open TheSythus opened 6 years ago

TheSythus commented 6 years ago

Hi,

one other request: Instead of using a normal API URL (execute-api) we would like to use custom urls to get rid of the preflight (options). We figured out that you are using a method called isApiGatewayUrl.

It would be great if you could remove this hard dependency.

Do you think this would be possible?

Regards

SamVerschueren commented 6 years ago

It would be possible if we would make the regular expression configurable through the config object. I don't think that not checking the URL is not an option because the interceptor intercepts all the HTTP calls. This means, also the calls which are not pointing to the API Gateway.

So yes definitely, I would be fine with a PR which introduced an extra property in the config object of type RegExp which is then used in the check here.

I can also do it myself but I can't commit to a certain timing on this.