Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build with the plugin #19

Open
tufu9441 opened this issue Apr 9, 2020 · 3 comments
Open

Cannot build with the plugin #19

tufu9441 opened this issue Apr 9, 2020 · 3 comments

Comments

@tufu9441
Copy link

tufu9441 commented Apr 9, 2020

When I tried to build with the cors plugin by following steps (from https://github.com/caddyserver/caddy/tree/v1#install), the cors plugin cannot be compiled in:

  1. Create a new folder and within a main.go file as:
package main

import (
	"github.com/caddyserver/caddy/caddy/caddymain"
	_ "github.com/captncraig/cors"
        _ "github.com/caddyserver/forwardproxy"
)
func main() {
	// optional: disable telemetry
	// caddymain.EnableTelemetry = false
	caddymain.Run()
}
  1. Run go mod init caddy

  2. Run go get -u github.com/caddyserver/caddy
    image

  3. Run go build
    image

After the Caddy binary generated, I ran ./caddy -plugins and didn’t see the http.cors plugin listed, however the http.forwardproxy plugin can be seen.
image

@schlypel
Copy link

schlypel commented Jun 9, 2020

Same here...

package main

import (
        "github.com/caddyserver/caddy/caddy/caddymain"
        _ "github.com/nicolasazrak/caddy-cache"
        _ "github.com/captncraig/cors"
        //_ ""
)

func main() {
        // optional: disable telemetry
        caddymain.EnableTelemetry = false
        caddymain.Run()
}

Cache Plugin is there, cors plugin missing.

May be relevant difference:

  • GOOS=linux
  • GOARCH=arm
  • GOARM=7

Is this plugin compatible with armv7 architectures? (RaspberryPi)

@Silver-Golden
Copy link

This may be a tad late for @tufu9441 but I experimented a tad and found that using

_ "github.com/captncraig/cors/caddy" worked for me, that gets it on teh list for me

@schlypel
Copy link

schlypel commented Jul 1, 2020

this is fixed by @Silver-Golden comment, can be closed afaik

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

No branches or pull requests

3 participants