Since the web and the API have been split and they are going to be mapped to different sub-domains and/or ports, we need to make sure we enable CORS. For example, a request from www.hadithhouse.net to api.hadithhouse.net should be possible. Also, to help with running the website locally without having to install the API, it is helpful to be able to make requests from, e.g., local.haidthouse.net:8000 to api-dev.hadithhouse.net, where local.hadithhouse.net is a local mapping to 127.0.01 in hosts file.
Since the web and the API have been split and they are going to be mapped to different sub-domains and/or ports, we need to make sure we enable CORS. For example, a request from
www.hadithhouse.net
toapi.hadithhouse.net
should be possible. Also, to help with running the website locally without having to install the API, it is helpful to be able to make requests from, e.g.,local.haidthouse.net:8000
toapi-dev.hadithhouse.net
, wherelocal.hadithhouse.net
is a local mapping to 127.0.01 inhosts
file.