I would like to configure 2 hosts that allowed to access data from a webapi and 1 of those hosts can also create new objects using the POST method.
Currently my WebApiConfig.cs file looks like this:
public static void Register(HttpConfiguration config)
{
//lines removed for clarity
var cors = new EnableCorsAttribute("http://localhost:36312, http://localhost:24668", "*", "GET, POST");
config.EnableCors(cors);
// lines removed for clarity
}
This will allow both hosts to use the GET and POST methods to access or create content, how can the config be setup so that the POST method is only available for the :24668 host?