1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-24 08:12:38 +02:00

Fix deprecations

This commit is contained in:
DarthSim 2024-07-08 21:49:27 +03:00
parent 02081f84c5
commit 6bb5378352
2 changed files with 4 additions and 10 deletions

View File

@ -37,7 +37,6 @@ import (
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
"go.opentelemetry.io/otel/semconv/v1.17.0/httpconv"
"go.opentelemetry.io/otel/trace"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"github.com/imgproxy/imgproxy/v3/config"
@ -236,13 +235,8 @@ func mapDeprecatedConfig() {
}
func buildGRPCExporters() (*otlptrace.Exporter, sdkmetric.Exporter, error) {
tracerOpts := []otlptracegrpc.Option{
otlptracegrpc.WithDialOption(grpc.WithBlock()),
}
meterOpts := []otlpmetricgrpc.Option{
otlpmetricgrpc.WithDialOption(grpc.WithBlock()),
}
tracerOpts := []otlptracegrpc.Option{}
meterOpts := []otlpmetricgrpc.Option{}
if tlsConf, err := buildTLSConfig(); tlsConf != nil && err == nil {
creds := credentials.NewTLS(tlsConf)

View File

@ -191,8 +191,8 @@ func (t *transport) RoundTrip(req *http.Request) (*http.Response, error) {
if output.CacheControl != nil {
header.Set("Cache-Control", *output.CacheControl)
}
if output.Expires != nil {
header.Set("Expires", output.Expires.Format(http.TimeFormat))
if output.ExpiresString != nil {
header.Set("Expires", *output.ExpiresString)
}
if output.ETag != nil {
header.Set("ETag", *output.ETag)