podium-lib / issues

All podium issues, bugs, questions etc goes here. Documentation is to be found at https://podium-lib.io
1 stars 0 forks source link

Feature: External Layout Proxy #36

Open digitalsadhu opened 4 years ago

digitalsadhu commented 4 years ago

There are times when having the proxy mounted in the layout causes the layout to receive an excessive amount of traffic and a better solution would be to have a stand alone proxy. The problem with doing so is that all podlet client side code would then need to hard code the proxy URL. Ideally, the podlet should be able to dynamically create client side proxy urls using the context as usual and the layout should be able to determine the location of the proxy. This feature proposes exactly that in the following way:

Example syntax

const layout = new Layout({
  ...
  proxy: {
    podletOne: 'http://someproxyserver/podletOne',
    podletTwo: 'http://someproxyserver/podletTwo',
  }
  ...
});