caddyserver/nginx-adapter

Failing to build on Caddy 2.8.x

alexandzors opened this issue · 2 comments

I currently have a custom binary building via Github Actions and it's currently failing to build with this module added.

go vr: 1.21

Action Log:

# github.com/caddyserver/nginx-adapter
Error: /home/runner/go/pkg/mod/github.com/caddyserver/nginx-adapter@v0.0.6/server.go:237:18: cannot use make(map[string]string) (value of type map[string]string) as map[string]caddyhttp.StringArray value in struct literal
Error: /home/runner/go/pkg/mod/github.com/caddyserver/nginx-adapter@v0.0.6/server.go:241:30: cannot use loggerName (variable of type string) as caddyhttp.StringArray value in assignment

Build cmd file:

#!/bin/bash
cd amd64
echo #################
echo BUILD AMD64/WIN64
echo #################
xcaddy build --with github.com/WeidiDeng/caddy-cloudflare-ip --with github.com/caddy-dns/cloudflare --with github.com/caddyserver/ntlm-transport --with github.com/caddyserver/replace-response --with github.com/greenpau/caddy-security --with github.com/caddyserver/transform-encoder --with github.com/caddyserver/nginx-adapter --with github.com/mholt/caddy-ratelimit
xcaddy build --output ./caddy.exe --with github.com/WeidiDeng/caddy-cloudflare-ip --with github.com/caddy-dns/cloudflare --with github.com/caddyserver/ntlm-transport --with github.com/caddyserver/replace-response --with github.com/greenpau/caddy-security --with github.com/caddyserver/transform-encoder --with github.com/caddyserver/nginx-adapter --with github.com/mholt/caddy-ratelimit
chmod +x caddy
cd ..
cd arm64
echo #################
echo BUILD ARM64
echo #################
export GOOS=linux
export GOARCH=arm64
xcaddy build --output ./caddy_arm64 --with github.com/WeidiDeng/caddy-cloudflare-ip --with github.com/caddy-dns/cloudflare --with github.com/caddyserver/ntlm-transport --with github.com/caddyserver/replace-response --with github.com/greenpau/caddy-security --with github.com/caddyserver/transform-encoder --with github.com/caddyserver/nginx-adapter --with github.com/mholt/caddy-ratelimit

Not sure if this is a me error or a module error 😄

There was a breaking change in Caddy that requires changes in this module. That's on me. I'll fix it in a day or two 🙂

Fixed in v0.0.7