Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

405 when trying to access call dav w/IOS14 #37

Closed
smaktacular opened this issue May 13, 2021 · 6 comments
Closed

405 when trying to access call dav w/IOS14 #37

smaktacular opened this issue May 13, 2021 · 6 comments
Assignees

Comments

@smaktacular
Copy link
Contributor

smaktacular commented May 13, 2021

When trying to setup caldav sync on IOS 14.5.1 I get the following log output:

192.168.208.9 - - [13/May/2021:19:49:50 +0000] "PROPFIND /.well-known/caldav HTTP/1.1" 302 145 "-" "iOS/14.5.1 (18E212) dataaccessd/1.0" "192.168.1.117"

192.168.208.9 - - [13/May/2021:19:49:50 +0000] "PROPFIND / HTTP/1.1" 405 157 "-" "iOS/14.5.1 (18E212) dataaccessd/1.0" "192.168.1.117"

192.168.208.9 - - [13/May/2021:19:49:50 +0000] "PROPFIND /principals/ HTTP/1.1" 405 157 "-" "iOS/14.5.1 (18E212) dataaccessd/1.0" "192.168.1.117"

192.168.208.9 - - [13/May/2021:19:49:50 +0000] "PROPFIND /calendar/dav/username/user/ HTTP/1.1" 405 157 "-" "iOS/14.5.1 (18E212) dataaccessd/1.0" "192.168.1.117"

Container (0.8.0 nginx) runs behind traefik with self-signed cert and card dav is working fine. Also the CA that issued the cert is trusted by IOS.

@ckulka ckulka self-assigned this May 14, 2021
@ckulka
Copy link
Owner

ckulka commented May 14, 2021

Sounds suspiciously like this one here: sabre-io/Baikal#1030

Can you give it a try and see if that resolves it?

@smaktacular
Copy link
Contributor Author

smaktacular commented May 14, 2021

It works now, I had to add the following to the container config of traefik:

    - "traefik.http.middlewares.baikal-dav.redirectregex.regex=https://(.*)/.well-known/(card|cal)dav"
      - "traefik.http.middlewares.baikal-dav.redirectregex.replacement=https://$$1/dav.php/"
      - "traefik.http.middlewares.baikal-dav.redirectregex.permanent=true"
      - "traefik.http.routers.baikal.middlewares=baikal-dav"

I'm not 100% sure why this needs to be on rev proxy side instead of nginx, but anyways ...

@ckulka
Copy link
Owner

ckulka commented May 14, 2021

Hi @smaktacular ,

I don't have an iPhone, could you please try to use (e.g. mount) a modified Nginx file and see if it works in iOS and the other devices/apps you are using?

I'd be curious to know if adding a trailing slash / to line 10 and 11 in /etc/nginx/conf.d/default.conf resolves it (since that's the only difference in the Traefik configuration you posted):

  rewrite ^/.well-known/caldav /dav.php/ redirect;
  rewrite ^/.well-known/carddav /dav.php/ redirect;

Baikal's documentation doesn't have it, but this might just be an oversight.

@smaktacular
Copy link
Contributor Author

@ckulka: Did the test and the only difference it made was that the uri entered in the ios setup dialog recieved the trailing slash as well. Still 405 without the modification to the traefik labels

@smaktacular
Copy link
Contributor Author

smaktacular commented May 16, 2021

And, on top to see a difference in both configs, one needs to setup the account on ios from scratch, because once the account is setup properly you can remove the rev proxy directives and everything still works.
But if you set the account up without the rev proxy directives it will not work, even with the trailing slash addition, suggested by @ckulka .

ckulka added a commit to smaktacular/baikal-docker that referenced this issue May 18, 2021
ckulka added a commit that referenced this issue May 18, 2021
Added URI rewrite to Traefik example to address iOS issue described in #37
@ckulka
Copy link
Owner

ckulka commented May 18, 2021

Thanks for your PR! I merged it and will close this issue as this is now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants