mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-07-12 23:00:55 +02:00
* Implements processing option to control meta stripping * Update based on code review comments Change name of option to "stripmeta" and change how we handle config vs request setting logic * Fix indentation style typo * Fix indentation style typo * Use full metadata naming for config and variables Co-authored-by: John Koehl <johnk@zillowgroup.com> Co-authored-by: John Koehl <jkoehl>
This commit is contained in:
@ -405,6 +405,16 @@ func (s *ProcessingOptionsTestSuite) TestParsePathAdvancedCachebuster() {
|
||||
assert.Equal(s.T(), "123", po.CacheBuster)
|
||||
}
|
||||
|
||||
func (s *ProcessingOptionsTestSuite) TestParsePathAdvancedStripMetadata() {
|
||||
req := s.getRequest("http://example.com/unsafe/strip_metadata:true/plain/http://images.dev/lorem/ipsum.jpg")
|
||||
ctx, err := parsePath(context.Background(), req)
|
||||
|
||||
require.Nil(s.T(), err)
|
||||
|
||||
po := getProcessingOptions(ctx)
|
||||
assert.True(s.T(), po.StripMetadata)
|
||||
}
|
||||
|
||||
func (s *ProcessingOptionsTestSuite) TestParsePathWebpDetection() {
|
||||
conf.EnableWebpDetection = true
|
||||
|
||||
|
Reference in New Issue
Block a user