Skip to content

0.3.6 BREAK #28

@alexandrestein

Description

@alexandrestein

Using the body-limit plugin, globally or at the host level:

- name: body-limit
  limit: 500MB

The main function panic:

panic: echo: invalid body-limit=

goroutine 1 [running]:
github.com/labstack/armor/vendor/github.com/labstack/echo/middleware.BodyLimitWithConfig(0x82f478, 0x0, 0x0, 0x0, 0x0)
	/Users/vr/Projects/labstack/armor/src/github.com/labstack/armor/vendor/github.com/labstack/echo/middleware/body_limit.go:63 +0x2bf
github.com/labstack/armor/plugin.(*BodyLimit).Init(0xc42004dc20, 0x7aa960, 0xc42000fb00)
	/Users/vr/Projects/labstack/armor/src/github.com/labstack/armor/plugin/body_limit.go:16 +0x4e
github.com/labstack/armor/plugin.Decode(0xc42000fb00, 0xc420108120, 0xc42006cea0, 0x9ea220, 0xc420072960, 0x0, 0x0)
	/Users/vr/Projects/labstack/armor/src/github.com/labstack/armor/plugin/plugin.go:117 +0x22c
github.com/labstack/armor/http.(*HTTP).LoadPlugins(0xc4200f2ca0)
	/Users/vr/Projects/labstack/armor/src/github.com/labstack/armor/http/http.go:149 +0xe5
main.main()
	/Users/vr/Projects/labstack/armor/src/github.com/labstack/armor/cmd/armor/main.go:100 +0x326

And the static plugin is not working either.
The server respond me with 404.

A working configuration on 0.3.5 but not on 0.3.6 (docker image):

address: ":80"
tls:
  address: ":443"
  auto: true
  cache_dir: /etc/armor/certs
plugins:
- name: https-redirect
- name: body-limit
  limit: 500MB
# - name: secure
hosts:
  dom.com:
    paths:
      "/":
        plugins:
        - name: static
          root: /var/www/test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions