Process:
- Including CORS
- In one url line, e.g domain.com/x/dataAll/type/users/format/json
- Depend on the model
Compatible with :
- Apache (dav mod need to be enable)
- nginx
And here's some example handling cors
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Allow-Method: POST, GET, OPTIONS, PUT, DELETE');
header("Access-Control-Allow-Headers: X-Custom-Header, X-API-KEY, Origin, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method, Authorization");
This is on GitHub so let me know if I've forked it somewhere.
- codeigniter PHP Framework
- nginx Web Server
- apache Web Server