fix: remove binary, add Makefile, document validators

This commit is contained in:
2026-04-10 22:04:13 -07:00
parent 4bb695ce9c
commit ae6bb19777
4 changed files with 36 additions and 0 deletions
+1
View File
@@ -52,3 +52,4 @@ __debug_bin
# OS
Thumbs.db
.sisyphus/
caddy-mcp-server
+27
View File
@@ -0,0 +1,27 @@
.PHONY: build test clean install lint
BINARY_NAME=caddy-mcp-server
GO=go
GOFLAGS=-ldflags="-s -w"
build:
$(GO) build $(GOFLAGS) -o $(BINARY_NAME) .
test:
./test.sh
clean:
rm -f $(BINARY_NAME)
$(GO) clean
install: build
cp $(BINARY_NAME) $(GOPATH)/bin/
lint:
$(GO) vet ./...
gofmt -l .
dev:
$(GO) run .
all: clean build test
+8
View File
@@ -78,6 +78,14 @@ ssh -L 2019:localhost:2019 server-1 &
- `REVIEW_DOMAIN` - Domain for WIP review environments (default: `review.example.com`)
## Architecture
### Input Validation (validators.go)
The server includes comprehensive input validation to prevent security issues:
- **Domain validation**: Ensures valid domain format
- **Path validation**: Prevents directory traversal attacks
- **Port validation**: Validates port ranges (1-65535)
- **Header validation**: Validates HTTP header names
- `client.go` - Caddy Admin API client
- `server.go` - MCP server setup
BIN
View File
Binary file not shown.