Skip to content

Commit

Permalink
fix: 🐛 token issue on live preview [CS-35833]
Browse files Browse the repository at this point in the history
  • Loading branch information
uttamukkoji committed Apr 12, 2023
1 parent c0c965b commit 09966a4
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 21 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
## Change log

### Version: 3.17.1
#### Date: April-18-2023
##### Bug fix:
- Access token for header issue resolved

### Version: 3.17.0
#### Date: March-30-2023
##### Bug fix:
- Cache set issue resolved
- Type-definition for SyncResult updated

### Version: 3.16.1
#### Date: February-28-2023
- Package dependency updated
### Version: 3.16.0
#### Date: February-10-2023
##### New Features:
Expand Down
10 changes: 0 additions & 10 deletions docs-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@
"src/core/cache.js"
]
},
"templates":
{
"default":
{
"staticFiles":
{
"include": [ "./contentstack-templates/favicon.ico"]
}
}
},
"tags": {
"dictionaries": ["jsdoc", "closure"],
"allowUnknownTags": true
Expand Down
8 changes: 7 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "contentstack",
"version": "3.17.0",
"version": "3.17.1",
"description": "Contentstack Javascript SDK",
"homepage": "https://www.contentstack.com/",
"author": {
Expand Down Expand Up @@ -89,6 +89,7 @@
"nodemailer": "^6.9.1",
"request": "^2.88.2",
"string-replace-loader": "1.3.0",
"taffydb": "^2.7.3",
"tap": "^16.3.4",
"tap-html": "^1.1.0",
"tap-json": "1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/core/modules/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default class Assets {
if (this.asset_uid) {
this.requestParams = {
method: 'POST',
headers: this.headers,
headers: Utils.mergeDeep({}, this.headers),
url: this.config.protocol + "://" + this.config.host + ':' + this.config.port + '/' + this.config.version + this.config.urls.assets + this.asset_uid,
body: {
_method: 'GET',
Expand Down
2 changes: 1 addition & 1 deletion src/core/modules/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export default class Entry {
if (this.entry_uid) {
this.requestParams = {
method: 'POST',
headers: this.headers,
headers: Utils.mergeDeep({}, this.headers),
url: this.config.protocol + "://" + host + '/' + this.config.version + this.config.urls.content_types + this.content_type_uid + this.config.urls.entries + this.entry_uid,
body: {
_method: 'GET',
Expand Down
6 changes: 3 additions & 3 deletions src/core/modules/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ export default class Query extends Entry {
this._query['count'] = true;
this.requestParams = {
method: 'POST',
headers: this.headers,
headers: Utils.mergeDeep({}, this.headers),
url: url,
body: {
_method: 'GET',
Expand Down Expand Up @@ -754,7 +754,7 @@ export default class Query extends Entry {
url = (this.type && this.type === 'asset') ? baseURL + this.config.urls.assets : baseURL + this.config.urls.content_types + this.content_type_uid + this.config.urls.entries;
this.requestParams = {
method: 'POST',
headers: this.headers,
headers: Utils.mergeDeep({}, this.headers),
url: url,
body: {
_method: 'GET',
Expand Down Expand Up @@ -791,7 +791,7 @@ export default class Query extends Entry {
this._query.limit = 1;
this.requestParams = {
method: 'POST',
headers: this.headers,
headers: Utils.mergeDeep({}, this.headers),
url: url,
body: {
_method: 'GET',
Expand Down
8 changes: 4 additions & 4 deletions src/core/stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ export default class Stack {
fetch(fetchOptions) {
this.requestParams = {
method: 'POST',
headers: this.headers,
headers: Utils.mergeDeep({}, this.headers),
plugins: this.plugins,
url: this.config.protocol + "://" + this.config.host + ':' + this.config.port + '/' + this.config.version + this.config.urls.content_types + this.content_type_uid,
body: {
Expand Down Expand Up @@ -464,7 +464,7 @@ export default class Stack {
getLastActivities() {
this.requestParams = {
method: 'POST',
headers: this.headers,
headers: Utils.mergeDeep({}, this.headers),
url: this.config.protocol + "://" + this.config.host + ':' + this.config.port + '/' + this.config.version + this.config.urls.content_types,
body: {
_method: 'GET',
Expand Down Expand Up @@ -494,7 +494,7 @@ export default class Stack {
getContentTypes(param = {}) {
this.requestParams = {
method: 'POST',
headers: this.headers,
headers: Utils.mergeDeep({}, this.headers),
url: this.config.protocol + "://" + this.config.host + ':' + this.config.port + '/' + this.config.version + this.config.urls.content_types,
body: {
_method: 'GET',
Expand Down Expand Up @@ -537,7 +537,7 @@ export default class Stack {
this._query = Utils.mergeDeep(this._query, params);
this.requestParams = {
method: 'POST',
headers: this.headers,
headers: Utils.mergeDeep({}, this.headers),
url: this.config.protocol + "://" + this.config.host + ':' + this.config.port + '/' + this.config.version + this.config.urls.sync,
body: {
_method: 'GET',
Expand Down

0 comments on commit 09966a4

Please sign in to comment.