Skip to content

Error during parsing rate_limit #13

Description

@zxiest

Hello there,

Any idea why I'm getting the error below?

Error during parsing: parsing caddyfile tokens for 'rate_limit': /etc/caddy/Caddyfile:25 -
Error during parsing: Wrong argument count or unexpected line ending after '{http.request.uri.query.id}'

localhost:8080 {
    route /foo {
        rate_limit {query.id} 2r/m

        respond 200
    }
}

This is my Dockerfile

FROM caddy:2.6.2-builder-alpine as builder

RUN xcaddy build \
    --with github.com/RussellLuo/caddy-ext/ratelimit

FROM caddy:2.6.2-alpine

COPY --from=builder /usr/bin/caddy /usr/bin/caddy

and this is my docker-compose.yml

version: "3.7"

services:
  caddy:
    logging:
      options:
        max-size: "500m"
        max-file: "5"

    build: .
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - $PWD/Caddyfile:/etc/caddy/Caddyfile
volumes:
  caddy_data:
  caddy_config:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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