json files cannot be copied to webdav

  • The webdav-plugin works in principle. However, no json files can be copied to the webdav-share. The error message: HTTP Error. Method Not Allowed.


    What may need to be added to the nginx configuration?


    Thanks for your help

    Jochen

    omv 7.4.17 sandworm | 64 bit | Linux 6.1.0-28-amd64

    Edited once, last by jochen.sw ().

  • chente

    Approved the thread.
  • jochen.sw

    Changed the title of the thread from “json-Dateien können nicht auf wedav kopiert werden” to “json files cannot be copied to webdav”.
    • Official Post

    I can replicate this. I tried a lot of different nginx webdav changes to allow it and I still can't get to accept a json file. If someone has any ideas, I am open to changing the plugin.

    omv 8.0.10-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.4 | compose 8.1.2 | cterm 8.0 | borgbackup 8.1 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • My understanding is that routes ending with .json are matching a different location block within the openmediavault-webgui conf file. This results in the file no longer routing to the alias defined in the webdav location block, resulting in the problems here. (this also happens for .php files as well).


    My fix has been to add the ^~ prefix so it won't search against other regular expression match. You'll need to add some extra rules to still assign the headers in the other *.json location block. Rewriting the webdav conf below has worked for me, but I'm not too experienced with nginx so hoping I haven't introduced any new problems onto my setup.


  • I've tried to change the webdav configuration file.

    Now .json - files can be copied to the webdav share.

    omv 7.4.17 sandworm | 64 bit | Linux 6.1.0-28-amd64

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!