diff --git a/CHANGELOG.md b/CHANGELOG.md index 14b0d61..4f1bb70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### Version: 2.22.2 +#### Date: July-14-2025 + +##### Fix: +- Fixed token issue for Live Preview + ### Version: 2.22.1 #### Date: June-13-2025 diff --git a/Contentstack.Core/Models/Query.cs b/Contentstack.Core/Models/Query.cs index 252cd42..c50a09e 100644 --- a/Contentstack.Core/Models/Query.cs +++ b/Contentstack.Core/Models/Query.cs @@ -1886,11 +1886,11 @@ private async Task Exec() if (this.ContentTypeInstance!=null && this.ContentTypeInstance?.StackInstance.LivePreviewConfig.Enable == true && this.ContentTypeInstance?.StackInstance.LivePreviewConfig.ContentTypeUID == this.ContentTypeInstance?.ContentTypeId && header.Key == "access_token" - && isLivePreview) + && !string.IsNullOrEmpty(this.ContentTypeInstance.StackInstance.LivePreviewConfig.LivePreview)) { continue; } - headerAll.Add(header.Key, (string)header.Value); + headerAll.Add(header.Key, (String)header.Value); } } diff --git a/Directory.Build.props b/Directory.Build.props index bec8fed..cff023c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,5 +1,5 @@ - 2.22.1 + 2.22.2