Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rajarl
Contributor II
Contributor II

Update Virtual Proxy thru API

We have a .net app which installs the qlik sense silently to the customer pc. Here we would like to update the "Additional Response Headers" under "Virtual Proxy" as shown in below URL while installing the app. Please suggest how to achieve it.

HTTP Strict Transport Security (HSTS) in Qlik Sens... - Qlik Community - 1711505

Labels (1)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I believe you use the QRS API and set the "additionalResponseHeaders" property in the VirtualProxyConfig.

https://help.qlik.com/en-US/sense-developer/February2024/APIs/RepositoryServiceAPI/index.html?page=1...

-Rob

View solution in original post

3 Replies
Heinvandenheuvel
Specialist II
Specialist II

Wrong Forum

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I believe you use the QRS API and set the "additionalResponseHeaders" property in the VirtualProxyConfig.

https://help.qlik.com/en-US/sense-developer/February2024/APIs/RepositoryServiceAPI/index.html?page=1...

-Rob

rajarl
Contributor II
Contributor II
Author

Hi Rob,

Thanks for your reply. 

How to call that api by passing the values to additionalResponseHeaders property?

rajarl_0-1709184048410.png

Actually l like to update the additional response headers by the below value 

Strict-Transport-Security: max-age=31536000;includeSubDomains;Preload

Is it like /qrs/virtualproxyconfig/{id}?additionalResponseHeaders=Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

 

Thanks in Advance.

 

Hi Rob,

Thanks for your support.

Finally I got the solution as shown below.

string path = $"/qrs/virtualproxyconfig/{proxy.id}";
string body = JsonConvert.SerializeObject(proxy);
string bodyWithAdditionalResponseHeaders = body.Replace("\"additionalResponseHeaders\":\"\"", "\"additionalResponseHeaders\":\"Strict-Transport-Security: max-age=31536000;includeSubDomains;Preloads\"");