Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to set custom response headers in UI portals #1272

Closed
SanojPunchihewa opened this issue Jan 17, 2023 · 2 comments
Closed

Add option to set custom response headers in UI portals #1272

SanojPunchihewa opened this issue Jan 17, 2023 · 2 comments

Comments

@SanojPunchihewa
Copy link

SanojPunchihewa commented Jan 17, 2023

Problem

Currently, we cannot set custom response headers for the web pages served in the portals(publisher, dev and admin). It's better to have this feature so any user can easily set response headers depending on their use cases. Such as setting a custom CSP header.

Solution

Add the option to set custom response headers in UI portals

Affected Component

APIM

Version

No response

Implementation

No response

Related Issues

IS improvement : wso2/product-is#9088

Suggested Labels

No response

@Avishka-Shamendra
Copy link

Hi all,

ResponseHeaderSetFilter class (wso2/carbon-kernel#3071) which is already pre packed in the carbon-kernel can be used for this. However, currently we have to manually place the filter in the tomact/web.xml.j2 when needed with the headers. wso2/carbon-kernel#3627 introduces the option that allows users to set the headers through the deployment.toml

[[tomcat.custom_response_header_filters]]
headers = "X-WSO2-Test-Header:Test Value, X-WSO2-Test-Header-2:Test Value-2"
filter_url_pattern = "/*"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants