Skip to content

Conversation

vivekmittal
Copy link
Contributor

Cache headers are not set predictably. The cache headers are not being returned when deployed on an EC2.

https://stackoverflow.com/questions/43202919/http-headers-not-returned-on-ec2

Cache headers are not set predictably. The cache headers are not being returned when deployed on an EC2.

https://stackoverflow.com/questions/43202919/http-headers-not-returned-on-ec2
@baskarap
Copy link
Member

baskarap commented Nov 1, 2020

Thanks, but as far as i can see, we have this case covered in this unit test

func (s *ImageHandlerTestSuite) TestImageHandlerWithQueryParameters() {

or am i missing something here?

@baskarap baskarap self-requested a review November 1, 2020 06:34
@vivekmittal
Copy link
Contributor Author

This is unpredictable. It is working locally, but not on a prod environment (especially an Ubuntu-based EC2 instance). I am not too sure why exactly the order of setting headers matters except the fact that they become unpredictable after writing to the response body.

@vivekmittal
Copy link
Contributor Author

vivekmittal commented Nov 1, 2020

An example of a cloud instance (No changes are done to darkroom - except S3 config here, everything else is default)

https://darkroom-integration-1006053737.ap-south-1.elb.amazonaws.com/10beb069-7d27-3977-6327-2d16947c6ce9

Caching headers are not returned here

@vivekmittal
Copy link
Contributor Author

Rearranged the headers in another instance & it works

https://darkroom-production-1708587482.ap-south-1.elb.amazonaws.com/10beb069-7d27-3977-6327-2d16947c6ce9

@baskarap baskarap merged commit 06805b3 into gojek:master Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants