You've already forked imgproxy
mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-11-25 22:41:43 +02:00
Bump version
This commit is contained in:
@@ -6,9 +6,9 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/imath"
|
"github.com/imgproxy/imgproxy/v3/imath"
|
||||||
"github.com/imgproxy/imgproxy/v2/metrics/prometheus"
|
"github.com/imgproxy/imgproxy/v3/metrics/prometheus"
|
||||||
)
|
)
|
||||||
|
|
||||||
type intSlice []int
|
type intSlice []int
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imath"
|
"github.com/imgproxy/imgproxy/v3/imath"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Reader struct {
|
type Reader struct {
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config/configurators"
|
"github.com/imgproxy/imgproxy/v3/config/configurators"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
"github.com/imgproxy/imgproxy/v2/version"
|
"github.com/imgproxy/imgproxy/v3/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Int(i *int, name string) {
|
func Int(i *int, name string) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/airbrake/gobrake/v5"
|
"github.com/airbrake/gobrake/v5"
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
var notifier *gobrake.Notifier
|
var notifier *gobrake.Notifier
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/bugsnag/bugsnag-go/v2"
|
"github.com/bugsnag/bugsnag-go/v2"
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
var enabled bool
|
var enabled bool
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ package errorreport
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/errorreport/airbrake"
|
"github.com/imgproxy/imgproxy/v3/errorreport/airbrake"
|
||||||
"github.com/imgproxy/imgproxy/v2/errorreport/bugsnag"
|
"github.com/imgproxy/imgproxy/v3/errorreport/bugsnag"
|
||||||
"github.com/imgproxy/imgproxy/v2/errorreport/honeybadger"
|
"github.com/imgproxy/imgproxy/v3/errorreport/honeybadger"
|
||||||
"github.com/imgproxy/imgproxy/v2/errorreport/sentry"
|
"github.com/imgproxy/imgproxy/v3/errorreport/sentry"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Init() {
|
func Init() {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/honeybadger-io/honeybadger-go"
|
"github.com/honeybadger-io/honeybadger-go"
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/getsentry/sentry-go"
|
"github.com/getsentry/sentry-go"
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/version"
|
"github.com/imgproxy/imgproxy/v3/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
type eTagCalc struct {
|
type eTagCalc struct {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
|
|||||||
4
go.mod
4
go.mod
@@ -1,6 +1,6 @@
|
|||||||
module github.com/imgproxy/imgproxy/v2
|
module github.com/imgproxy/imgproxy/v3
|
||||||
|
|
||||||
go 1.13
|
go 1.15
|
||||||
|
|
||||||
require (
|
require (
|
||||||
cloud.google.com/go/storage v1.15.0
|
cloud.google.com/go/storage v1.15.0
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/config/configurators"
|
"github.com/imgproxy/imgproxy/v3/config/configurators"
|
||||||
)
|
)
|
||||||
|
|
||||||
func healthcheck() int {
|
func healthcheck() int {
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||||
|
|
||||||
azureTransport "github.com/imgproxy/imgproxy/v2/transport/azure"
|
azureTransport "github.com/imgproxy/imgproxy/v3/transport/azure"
|
||||||
fsTransport "github.com/imgproxy/imgproxy/v2/transport/fs"
|
fsTransport "github.com/imgproxy/imgproxy/v3/transport/fs"
|
||||||
gcsTransport "github.com/imgproxy/imgproxy/v2/transport/gcs"
|
gcsTransport "github.com/imgproxy/imgproxy/v3/transport/gcs"
|
||||||
s3Transport "github.com/imgproxy/imgproxy/v2/transport/s3"
|
s3Transport "github.com/imgproxy/imgproxy/v3/transport/s3"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ package imagedata
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/bufpool"
|
"github.com/imgproxy/imgproxy/v3/bufpool"
|
||||||
"github.com/imgproxy/imgproxy/v2/bufreader"
|
"github.com/imgproxy/imgproxy/v3/bufreader"
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagemeta"
|
"github.com/imgproxy/imgproxy/v3/imagemeta"
|
||||||
"github.com/imgproxy/imgproxy/v2/security"
|
"github.com/imgproxy/imgproxy/v3/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
)
|
)
|
||||||
|
|
||||||
var bmpMagick = []byte("BM")
|
var bmpMagick = []byte("BM")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package imagemeta
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
)
|
)
|
||||||
|
|
||||||
func DecodeGifMeta(r io.Reader) (Meta, error) {
|
func DecodeGifMeta(r io.Reader) (Meta, error) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
)
|
)
|
||||||
|
|
||||||
const heifBoxHeaderSize = int64(8)
|
const heifBoxHeaderSize = int64(8)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
)
|
)
|
||||||
|
|
||||||
type IcoMeta struct {
|
type IcoMeta struct {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Meta interface {
|
type Meta interface {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"bufio"
|
"bufio"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
)
|
)
|
||||||
|
|
||||||
var pngMagick = []byte("\x89PNG\r\n\x1a\n")
|
var pngMagick = []byte("\x89PNG\r\n\x1a\n")
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"golang.org/x/text/encoding/charmap"
|
"golang.org/x/text/encoding/charmap"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
"golang.org/x/image/riff"
|
"golang.org/x/image/riff"
|
||||||
"golang.org/x/image/vp8"
|
"golang.org/x/image/vp8"
|
||||||
"golang.org/x/image/vp8l"
|
"golang.org/x/image/vp8l"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
logrus "github.com/sirupsen/logrus"
|
logrus "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config/configurators"
|
"github.com/imgproxy/imgproxy/v3/config/configurators"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Init() error {
|
func Init() error {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"log/syslog"
|
"log/syslog"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config/configurators"
|
"github.com/imgproxy/imgproxy/v3/config/configurators"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
20
main.go
20
main.go
@@ -10,16 +10,16 @@ import (
|
|||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/errorreport"
|
"github.com/imgproxy/imgproxy/v3/errorreport"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/logger"
|
"github.com/imgproxy/imgproxy/v3/logger"
|
||||||
"github.com/imgproxy/imgproxy/v2/memory"
|
"github.com/imgproxy/imgproxy/v3/memory"
|
||||||
"github.com/imgproxy/imgproxy/v2/metrics"
|
"github.com/imgproxy/imgproxy/v3/metrics"
|
||||||
"github.com/imgproxy/imgproxy/v2/metrics/prometheus"
|
"github.com/imgproxy/imgproxy/v3/metrics/prometheus"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/version"
|
"github.com/imgproxy/imgproxy/v3/version"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func initialize() error {
|
func initialize() error {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func LogStats() {
|
func LogStats() {
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/ext"
|
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/ext"
|
||||||
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
|
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/version"
|
"github.com/imgproxy/imgproxy/v3/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
type spanCtxKey struct{}
|
type spanCtxKey struct{}
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/metrics/datadog"
|
"github.com/imgproxy/imgproxy/v3/metrics/datadog"
|
||||||
"github.com/imgproxy/imgproxy/v2/metrics/newrelic"
|
"github.com/imgproxy/imgproxy/v3/metrics/newrelic"
|
||||||
"github.com/imgproxy/imgproxy/v2/metrics/prometheus"
|
"github.com/imgproxy/imgproxy/v3/metrics/prometheus"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Init() error {
|
func Init() error {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/newrelic/go-agent/v3/newrelic"
|
"github.com/newrelic/go-agent/v3/newrelic"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/reuseport"
|
"github.com/imgproxy/imgproxy/v3/reuseport"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ import (
|
|||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
"github.com/imgproxy/imgproxy/v2/structdiff"
|
"github.com/imgproxy/imgproxy/v3/structdiff"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
const maxClientHintDPR = 8
|
const maxClientHintDPR = 8
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ProcessingOptionsTestSuite struct{ suite.Suite }
|
type ProcessingOptionsTestSuite struct{ suite.Suite }
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
const urlTokenPlain = "plain"
|
const urlTokenPlain = "plain"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package processing
|
package processing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/imath"
|
"github.com/imgproxy/imgproxy/v3/imath"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func applyFilters(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
func applyFilters(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package processing
|
package processing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/imgproxy/imgproxy/v2/imath"
|
"github.com/imgproxy/imgproxy/v3/imath"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
)
|
)
|
||||||
|
|
||||||
func calcPosition(width, height, innerWidth, innerHeight int, gravity *options.GravityOptions, allowOverflow bool) (left, top int) {
|
func calcPosition(width, height, innerWidth, innerHeight int, gravity *options.GravityOptions, allowOverflow bool) (left, top int) {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package processing
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/router"
|
"github.com/imgproxy/imgproxy/v3/router"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func copyMemoryAndCheckTimeout(ctx context.Context, img *vips.Image) error {
|
func copyMemoryAndCheckTimeout(ctx context.Context, img *vips.Image) error {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package processing
|
package processing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/imath"
|
"github.com/imgproxy/imgproxy/v3/imath"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func cropImage(img *vips.Image, cropWidth, cropHeight int, gravity *options.GravityOptions) error {
|
func cropImage(img *vips.Image, cropWidth, cropHeight int, gravity *options.GravityOptions) error {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package processing
|
package processing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func exportColorProfile(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
func exportColorProfile(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package processing
|
package processing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/imath"
|
"github.com/imgproxy/imgproxy/v3/imath"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func extend(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
func extend(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package processing
|
package processing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func finalize(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
func finalize(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package processing
|
package processing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
"github.com/imgproxy/imgproxy/v2/imath"
|
"github.com/imgproxy/imgproxy/v3/imath"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package processing
|
package processing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func flatten(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
func flatten(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package processing
|
package processing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func importColorProfile(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
func importColorProfile(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package processing
|
package processing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/imath"
|
"github.com/imgproxy/imgproxy/v3/imath"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func padding(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
func padding(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ package processing
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
type pipelineContext struct {
|
type pipelineContext struct {
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ package processing
|
|||||||
import (
|
import (
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
"github.com/imgproxy/imgproxy/v2/imath"
|
"github.com/imgproxy/imgproxy/v3/imath"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func extractMeta(img *vips.Image, baseAngle int, useOrientation bool) (int, int, int, bool) {
|
func extractMeta(img *vips.Image, baseAngle int, useOrientation bool) (int, int, int, bool) {
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ import (
|
|||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
"github.com/imgproxy/imgproxy/v2/imath"
|
"github.com/imgproxy/imgproxy/v3/imath"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/router"
|
"github.com/imgproxy/imgproxy/v3/router"
|
||||||
"github.com/imgproxy/imgproxy/v2/security"
|
"github.com/imgproxy/imgproxy/v3/security"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
var mainPipeline = pipeline{
|
var mainPipeline = pipeline{
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package processing
|
package processing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func rotateAndFlip(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
func rotateAndFlip(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package processing
|
package processing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func scale(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
func scale(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ package processing
|
|||||||
import (
|
import (
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
"github.com/imgproxy/imgproxy/v2/imath"
|
"github.com/imgproxy/imgproxy/v3/imath"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func canScaleOnLoad(imgtype imagetype.Type, scale float64) bool {
|
func canScaleOnLoad(imgtype imagetype.Type, scale float64) bool {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package processing
|
package processing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
func trim(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
func trim(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ package processing
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/imath"
|
"github.com/imgproxy/imgproxy/v3/imath"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
var watermarkPipeline = pipeline{
|
var watermarkPipeline = pipeline{
|
||||||
|
|||||||
@@ -10,18 +10,18 @@ import (
|
|||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/errorreport"
|
"github.com/imgproxy/imgproxy/v3/errorreport"
|
||||||
"github.com/imgproxy/imgproxy/v2/etag"
|
"github.com/imgproxy/imgproxy/v3/etag"
|
||||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
"github.com/imgproxy/imgproxy/v2/metrics"
|
"github.com/imgproxy/imgproxy/v3/metrics"
|
||||||
"github.com/imgproxy/imgproxy/v2/options"
|
"github.com/imgproxy/imgproxy/v3/options"
|
||||||
"github.com/imgproxy/imgproxy/v2/processing"
|
"github.com/imgproxy/imgproxy/v3/processing"
|
||||||
"github.com/imgproxy/imgproxy/v2/router"
|
"github.com/imgproxy/imgproxy/v3/router"
|
||||||
"github.com/imgproxy/imgproxy/v2/security"
|
"github.com/imgproxy/imgproxy/v3/security"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/config/configurators"
|
"github.com/imgproxy/imgproxy/v3/config/configurators"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagemeta"
|
"github.com/imgproxy/imgproxy/v3/imagemeta"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
"github.com/imgproxy/imgproxy/v2/router"
|
"github.com/imgproxy/imgproxy/v3/router"
|
||||||
"github.com/imgproxy/imgproxy/v2/vips"
|
"github.com/imgproxy/imgproxy/v3/vips"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Listen(network, address string) (net.Listener, error) {
|
func Listen(network, address string) (net.Listener, error) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package router
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||||
"github.com/imgproxy/imgproxy/v2/metrics"
|
"github.com/imgproxy/imgproxy/v3/metrics"
|
||||||
)
|
)
|
||||||
|
|
||||||
type timerSinceCtxKey = struct{}
|
type timerSinceCtxKey = struct{}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package security
|
package security
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ErrSourceResolutionTooBig = ierrors.New(422, "Source image resolution is too big", "Invalid source image")
|
var ErrSourceResolutionTooBig = ierrors.New(422, "Source image resolution is too big", "Invalid source image")
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SignatureTestSuite struct {
|
type SignatureTestSuite struct {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package security
|
package security
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func VerifySourceURL(imageURL string) bool {
|
func VerifySourceURL(imageURL string) bool {
|
||||||
|
|||||||
10
server.go
10
server.go
@@ -10,11 +10,11 @@ import (
|
|||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"golang.org/x/net/netutil"
|
"golang.org/x/net/netutil"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/errorreport"
|
"github.com/imgproxy/imgproxy/v3/errorreport"
|
||||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||||
"github.com/imgproxy/imgproxy/v2/reuseport"
|
"github.com/imgproxy/imgproxy/v3/reuseport"
|
||||||
"github.com/imgproxy/imgproxy/v2/router"
|
"github.com/imgproxy/imgproxy/v3/router"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/Azure/azure-storage-blob-go/azblob"
|
"github.com/Azure/azure-storage-blob-go/azblob"
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type transport struct {
|
type transport struct {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"io/fs"
|
"io/fs"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type transport struct {
|
type transport struct {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cloud.google.com/go/storage"
|
"cloud.google.com/go/storage"
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"google.golang.org/api/option"
|
"google.golang.org/api/option"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/aws/aws-sdk-go/aws/session"
|
"github.com/aws/aws-sdk-go/aws/session"
|
||||||
"github.com/aws/aws-sdk-go/service/s3"
|
"github.com/aws/aws-sdk-go/service/s3"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// transport implements RoundTripper for the 's3' protocol.
|
// transport implements RoundTripper for the 's3' protocol.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package version
|
package version
|
||||||
|
|
||||||
const version = "2.16.5"
|
const version = "3.0.0.beta1"
|
||||||
|
|
||||||
func Version() string {
|
func Version() string {
|
||||||
return version
|
return version
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagemeta"
|
"github.com/imgproxy/imgproxy/v3/imagemeta"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (img *Image) loadIco(data []byte, shrink int, scale float64, pages int) error {
|
func (img *Image) loadIco(data []byte, shrink int, scale float64, pages int) error {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package vips
|
package vips
|
||||||
|
|
||||||
import "github.com/imgproxy/imgproxy/v2/imagetype"
|
import "github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
|
|
||||||
func DisableLoadSupport(it imagetype.Type) {
|
func DisableLoadSupport(it imagetype.Type) {
|
||||||
typeSupportLoad[it] = false
|
typeSupportLoad[it] = false
|
||||||
|
|||||||
10
vips/vips.go
10
vips/vips.go
@@ -17,11 +17,11 @@ import (
|
|||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/imgproxy/imgproxy/v2/config"
|
"github.com/imgproxy/imgproxy/v3/config"
|
||||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||||
"github.com/imgproxy/imgproxy/v2/metrics/prometheus"
|
"github.com/imgproxy/imgproxy/v3/metrics/prometheus"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Image struct {
|
type Image struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user