I have a small application where I want to configure `cors_origins`
different dependent on the server its running on (dev/ staging/ live)
without allowing access cross those domains.
At the moment I have a policy defined in Python in a base.py, import it
and use it in my classes with the enpoint like so:
CORS_POLICY = {
'origins': ('*.dev.myserver'.com,),
#'origins': ('*.
stage.customerserver.com',),
#'origins': ('*.
livedomain.com',),
...,
}
---
@resource(path='/api/menu', cors_policy=CORS_POLICY)
class Menu(object):
def get(self):
...
return menu_def
---
Question: is there a way to define the `cors_origin` in the INI-files?
TIA Jens
--
Klein & Partner KG, member of BlueDynamics Alliance