|
@@ -43,7 +43,7 @@ This is a single file application! Upload "api.php" somewhere and enjoy!
|
43
|
43
|
- Sanitize and validate input using callbacks
|
44
|
44
|
- Permission system for databases, tables, columns and records
|
45
|
45
|
- Multi-tenant database layouts are supported
|
46
|
|
- - CORS support for cross-domain requests
|
|
46
|
+ - Multi-domain CORS support for cross-domain requests
|
47
|
47
|
- Combined requests with support for multiple table names
|
48
|
48
|
- Search support on multiple criteria
|
49
|
49
|
- Pagination, sorting and column selection
|
|
@@ -670,6 +670,18 @@ PUT http://localhost/api.php/categories/2
|
670
|
670
|
{"name":"Internet","icon":null}
|
671
|
671
|
```
|
672
|
672
|
|
|
673
|
+## Multi-domain CORS
|
|
674
|
+
|
|
675
|
+By specifying 'allow_origin' in the configuration you can control the 'Access-Control-Allow-Origin' response header that is being sent.
|
|
676
|
+
|
|
677
|
+If you set 'allow_origin' to '*' the 'Access-Control-Allow-Origin' response header will be set to '*'.
|
|
678
|
+In all other cases the 'Access-Control-Allow-Origin' response header is set to the value of the request header 'Origin' when a match is found.
|
|
679
|
+
|
|
680
|
+You may also specify 'allow_origin' to 'https://*.yourdomain.com' matching any host that starts with 'https://' and ends on '.yourdomain.com'.
|
|
681
|
+
|
|
682
|
+Multiple hosts may be specified using a comma, allowing you to set 'allow_origin' to 'https://yourdomain.com, https://*.yourdomain.com'.
|
|
683
|
+
|
|
684
|
+
|
673
|
685
|
## Errors
|
674
|
686
|
|
675
|
687
|
The following types of 404 'Not found' errors may be reported:
|