Skip to content

Commit e0774a7

Browse files
Merge pull request contentstack#308 from contentstack/development
staging PR
2 parents 9f8ccd2 + d9910c8 commit e0774a7

4 files changed

Lines changed: 83 additions & 77 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### Version: 4.11.1
2+
#### Date: feb-09-2026
3+
Fix: Fix security issues
4+
15
### Version: 4.11.0
26
#### Date: Jan-19-2026
37
Enhancement: Integrated getContentstackEndpoint method of Utils SDK for endpoint selection

‎README.md‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,63 @@ You will need to specify the API key, Delivery Token, and Environment Name of yo
6666

6767
Once you have initialized the SDK, you can start getting content in your app.
6868

69+
#### Region and Host Configuration
70+
71+
The SDK supports region and custom host configuration to connect to different Contentstack data centers or custom endpoints.
72+
73+
**Region Support**
74+
75+
You can specify a region to connect to the appropriate Contentstack data center. Available regions are:
76+
- `US` (default) - Uses `cdn.contentstack.io`
77+
- `EU` - Uses `eu-cdn.contentstack.com`
78+
- `AU` - Uses `au-cdn.contentstack.com`
79+
- `AZURE_NA` - Uses `azure-na-cdn.contentstack.com`
80+
- `AZURE_EU` - Uses `azure-eu-cdn.contentstack.com`
81+
- `GCP_NA` - Uses `gcp-na-cdn.contentstack.com`
82+
- `GCP_EU` - Uses `gcp-eu-cdn.contentstack.com`
83+
84+
```typescript
85+
import contentstack, { Region } from '@contentstack/delivery-sdk'
86+
87+
// Using region enum
88+
const stack = contentstack.stack({
89+
apiKey: "apiKey",
90+
deliveryToken: "deliveryToken",
91+
environment: "environment",
92+
region: Region.EU
93+
});
94+
95+
// Using region string
96+
const stack = contentstack.stack({
97+
apiKey: "apiKey",
98+
deliveryToken: "deliveryToken",
99+
environment: "environment",
100+
region: "eu"
101+
});
102+
```
103+
104+
**Custom Host Support**
105+
106+
You can specify a custom host to connect to a custom endpoint. If a custom host is provided, it takes priority over the region-based host.
107+
108+
```typescript
109+
const stack = contentstack.stack({
110+
apiKey: "apiKey",
111+
deliveryToken: "deliveryToken",
112+
environment: "environment",
113+
host: "custom-cdn.example.com"
114+
});
115+
116+
// Custom host with region (host takes priority)
117+
const stack = contentstack.stack({
118+
apiKey: "apiKey",
119+
deliveryToken: "deliveryToken",
120+
environment: "environment",
121+
region: Region.EU,
122+
host: "custom-cdn.example.com"
123+
});
124+
```
125+
69126
#### Querying content from your stack
70127

71128
To get a single entry, you need to specify the content type as well as the ID of the entry.

‎package-lock.json‎

Lines changed: 19 additions & 74 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@contentstack/delivery-sdk",
3-
"version": "4.11.0",
3+
"version": "4.11.1",
44
"type": "module",
55
"license": "MIT",
66
"main": "./dist/legacy/index.cjs",
@@ -47,8 +47,8 @@
4747
"prerelease": "npm run test:all && npm run validate:all"
4848
},
4949
"dependencies": {
50-
"@contentstack/core": "^1.3.6",
51-
"@contentstack/utils": "^1.6.3",
50+
"@contentstack/core": "^1.3.9",
51+
"@contentstack/utils": "^1.7.0",
5252
"axios": "^1.13.1",
5353
"humps": "^2.0.1"
5454
},

0 commit comments

Comments
 (0)