Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Cannot build with the plugin #19

@tufu9441

Description

@tufu9441

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions