You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.2 KiB

10 years ago
# cross-origin resource sharing
10 years ago
*Generated: Thu Oct 23 2014 11:58:14 GMT-0400 (EDT)*
10 years ago
## Request
```javascript
{
"protocol": "http:",
"host": "localhost",
"method": "GET",
"port": 3100,
10 years ago
"path": "/"
10 years ago
}
```
## Response
```javascript
Status: 200
{
10 years ago
"x-powered-by": "mapzen",
10 years ago
"charset": "utf8",
10 years ago
"cache-control": "public,max-age=60",
"server": "Pelias/0.0.0",
10 years ago
"access-control-allow-origin": "*",
"access-control-allow-methods": "GET",
"access-control-allow-headers": "X-Requested-With,content-type",
"access-control-allow-credentials": "true",
"content-type": "application/json; charset=utf-8",
"content-length": "50",
"etag": "W/\"32-85536434\"",
10 years ago
"date": "Thu, 23 Oct 2014 15:58:14 GMT",
10 years ago
"connection": "close"
}
```
```javascript
{
"name": "pelias-api",
"version": {
"number": "0.0.0"
}
}
```
## Tests
### ✓ access control headers correctly set
```javascript
response.should.have.header 'Access-Control-Allow-Origin','*'
response.should.have.header 'Access-Control-Allow-Methods','GET'
response.should.have.header 'Access-Control-Allow-Headers','X-Requested-With,content-type'
response.should.have.header 'Access-Control-Allow-Credentials','true'
```