Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
closes #83631 ### Problem Assets are served with a `cache-control` header that prevents any caching <img src="https://user-images.githubusercontent.com/640/99534379-517d2300-2975-11eb-8c05-4fb3f127c52b.png"/> ### Root cause Likely from this code https://github.com/elastic/kibana/blob/2a365ff6329544465227e61141ded6fba8bb2c80/src/core/server/http/http_tools.ts#L40-L43 Also based on these tests, it seems this is default/expected behavior https://github.com/elastic/kibana/blob/b3eefb97da8e712789b5c5d2eeae65c886ed8f64/src/core/server/http/integration_tests/router.test.ts#L510-L520 ### Proposed solution Set the header via the response handler as shown in this test: https://github.com/elastic/kibana/blob/b3eefb97da8e712789b5c5d2eeae65c886ed8f64/src/core/server/http/integration_tests/router.test.ts#L522-L536 ### This PR If this registry response contains a `cache-control` header, that value is included in the EPM response as well In `master`, which points to `epr-snapshot` <img width="742" alt="Screen Shot 2020-11-18 at 12 33 47 PM" src="https://user-images.githubusercontent.com/57655/99568352-4fc75580-299d-11eb-962f-6ff28fa9510d.png"> which matches https://epr-snapshot.elastic.co/package/apache/0.2.6/img/logo_apache.svg or using `epr.elastic.co`, <img width="781" alt="Screen Shot 2020-11-18 at 12 31 56 PM" src="https://user-images.githubusercontent.com/57655/99568350-4fc75580-299d-11eb-966e-f3489c13edb5.png"> which matches https://epr.elastic.co/package/apache/0.2.6/img/logo_apache.svg
- Loading branch information