So I started fixing this in the framework.
I now have started to add 'networkGroups' as a configuration setting so depending on whether you have multiple VPNs, networks, etc, you can maintain CORS settings for all and associate endpoints with the networkGroups.
For example, if we define our 'networkGroups' as public & private, we can then associate them in CORS settings like such:
corsInterceptor:
includeEnvironments: ['development','test','production']
excludeEnvironments: []
networkGroups:
public: ['http://localhost','http://localhost:8080','http://127.0.0.1','http://test.nosegrind.net']
private: ['http://localhost','http://localhost:8080','http://127.0.0.1']
This is how our allowedOrigins now looks for two separate networkGroups.
Now comes the COOL Part
Then we can associate the network group with the IOState files so that each set of endpoints has a setting of who networkGrp can access it:
"NAME":"person",
"NETWORKGRP": "public",
"VALUES": { ...
This allows us to say 'Person' endpoints are all part of the 'public' networkGrp
No comments:
Post a Comment