SSRS2022 Custom Header Problem

Wilson Shen 0 Reputation points
2025-01-07T02:59:18.05+00:00

Hi Guys,

I found SSRS2022 16.0.1116.12 Custom Headers

<Pattern>(?(?=((?![?]).)*api.*|.*rs:embed=true.*|.*rc:toolbar=false.*)(^((?!(.+)((\/api)|(\/(.+)(rs:embed=true|rc:toolbar=false)))).*$))|(^(?!(http|https):\/\/([^\/]+)((\/powerbi.*$)|(.*OpType=Calendar.*)))))</Pattern> <Value>SAMEORIGIN</Value> </Header> <Header> <Name>X-Content-Type-Options</Name> <Pattern>.*((\.js$)|(\.css$)|(\.html$))</Pattern> <Value>nosniff</Value> </Header> </CustomHeaders>

doesn't same as

https://zcusa.951200.xyz/en-us/sql/reporting-services/tools/server-properties-advanced-page-reporting-services?view=sql-server-ver15#options

descripted !

User's image

And which one is correct ?

Regards,

Wilson

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,970 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ZoeHui-MSFT 39,496 Reputation points
    2025-01-07T06:38:51.13+00:00

    Hi @Wilson Shen

    As said in the documentation,

    By default in Reporting Services 2019, there are no custom headers and the value is blank like shown in my environment.

    User's image

    By default in Power BI Report Server January 2020 and later, the value is:

    <CustomHeaders>
        <Header>
            <Name>X-Frame-Options</Name>
            <Pattern>(?(?=.*api.*|.*rs:embed=true.*|.*rc:toolbar=false.*)(^((?!(.+)((\/api)|(\/(.+)(rs:embed=true|rc:toolbar=false)))).*$))|(^(?!(http|https):\/\/([^\/]+)\/powerbi.*$)))</Pattern>
            <Value>SAMEORIGIN</Value>
        </Header>
    </CustomHeaders>
    
    
    

    Which is different between SSRS and PBIRS.

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.