microsoft-search / pnp-modern-search

Home of PnP Modern Search solutions, helping you move from classic to modern SharePoint and beyond
https://microsoft-search.github.io/pnp-modern-search
Other
388 stars 341 forks source link

Video Preview Unavailable in PnP modern search - Search Result Web Part Due to Content Security Policy Error #4117

Open Darwin698 opened 1 day ago

Darwin698 commented 1 day ago

Hi !) Version used 4.13.1.0

Describe the bug The video preview in the small window within the Search Results web part is no longer available. This issue pertains to videos hosted on the same SharePoint site. A month ago, this functionality worked correctly.

Currently:

Clicking on the video within the search results triggers the following error in the browser console: Refused to frame '' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'none'". If the user navigates to the full video page, the video plays without issues. However, previewing the video directly from the search results page is not possible. This problem occurs across multiple browsers, including Google Chrome and Microsoft Edge.

To Reproduce Steps to reproduce the issue:

Navigate to the page with the custom web part displaying search results. Search for content that includes video results hosted on the same SharePoint site. Attempt to preview a video by clicking on it in the search results. Observe the error in the browser console and the absence of video preview functionality. Expected behavior When clicking on a video in the search results, a preview of the video should be displayed without errors in the small window, as it worked previously.

Screenshots image

Laptop: image

Browser: Tested on both Chrome and Edge

The issue may be related to changes in Content Security Policy (CSP) configurations or iframe embedding restrictions. The problem started recently, as video previews in the search results were functional approximately one month ago.