Skip to content

Proxy: 405 Method Not Allowed when proxying an own cloud service #40

Description

@irundaia

I've been setting up armor to proxy a couple of services on my own server. I'm running into an issue when attempting to setup own cloud. Apparently this works with the webdav protocol. This uses some non-standard HTTP verbs, for instance PROPFIND.

I'm running own cloud using the following command:

docker run -d -p 9090:80 -v /path/to/external/storage:/var/www/html owncloud:8.1

Whenever I try to connect the own cloud client to my service, it responds with a 405 { "message": "Method Not Allowed" }. This behaviour is reproducible using the following curl command:

curl -X PROPFIND https://<host>/remote.php/webdav/ -v

Note that performing this request on the service directly, results in a 401 since no authentication headers are sent:

curl -X PROPFIND http://localhost:9090/remote.php/webdav/ -v

I proxy the own cloud service using the following armor config:

{
  "address": ":80",
  "tls": {
    "address": ":443",
    "cert_file": "signed.crt",
    "key_file": "domain.key",
    "auto": true
  },
  "plugins": [{
    "name": "https-redirect"
  }],
  "hosts": {
    "cloud.<host>": {
      "plugins": [{
        "name": "proxy",
        "targets": [{"name": "cloud", "url": "http://localhost:9090"}]
      }]
    },
    "build.<host>": {
      "plugins": [{
        "name": "proxy",
        "targets": [{"name": "build", "url": "http://localhost:9000"}]
      }]
    }
  }
}

Also the following log line is produced whenever I attempt to setup own cloud:

{"time":"2018-03-11T18:36:40.171463672+01:00","level":"ERROR","prefix":"armor","file":"echo.go","line":"285","message":"code=405, message=Method Not Allowed"}

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions