
CORS Essentials
By :

IBM Cloudant is a NoSQL JSON document store that is optimized for handling heavy workloads of concurrent reads and writes in the cloud; a workload that is typical of large, fast-growing web and mobile apps. It provides a simple JSON API for configuring CORS for your database, which may be changed dynamically.
IBM Cloudant provides the endpoint /_api/v2/user/config/cors
. A GET
call to the endpoint retrieves the CORS
configuration for your application. You can change the CORS
configuration with a PUT
call to the endpoint.
The following request reads the CORS
configuration. Note that both localdomain.com
and www.localdomain.com
are allowed origins, since they are considered different domains under the same origin policy. This example also allows requests only from domains on HTTPS secured with SSL; you may allow a domain over HTTP, understanding the risk:
GET /_api/v2/user/config/cors HTTP...
Change the font size
Change margin width
Change background colour