webflow / js-webflow-api

Node.js SDK for the Webflow Data API
https://www.npmjs.com/package/webflow-api
286 stars 93 forks source link

Configuration default host #80

Closed SalGnt closed 1 year ago

SalGnt commented 1 year ago

Is there a particular reason why the prefix api. is hardcoded and not included in DEFAULT_HOST? What if a custom host doesn't include that specific prefix?

johnagan commented 1 year ago

Can you share a scenario where custom host should be something other than Webflow’s API?

SalGnt commented 1 year ago

Sure. Due to security reasons the interaction with Webflow is handled by a Man In The Middle proxy, with its own endpoint (that doesn't always include api.) that is used by the SDK on the client. Also, having optional params can help provide other possible data that such proxy needs.

The same scenario applies to #81.

Thank you!

johnagan commented 1 year ago

same solution as #81