DAVx5 + Cloudflare = Request does not pass strict cookie check

The Basics
  • Nextcloud Server version (e.g., 29.x.x):
    • 33.0.0
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian 13.2
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.66
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • NPM 2.13.7
  • PHP version (e.g, 8.3):
    • 8.3.30
  • Is this the first time you’ve seen this error? (Yes / No):
    • YES
  • When did this problem seem to first start?
    • replace me
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Yes, Cloudflaree

Summary of the issue you are facing:

I use Cloudflare-Tunnek with a mTLS certificate. Access via the browser works. However, synchronization with DAVx5 fails. In the Nextcloud log, I only find the message “Request does not pass strict cookie check,” without any further details.

Steps to replicate it (hint: details matter!):

  1. Setup cloudflare tunnel with mTLS

  2. Setup DAVx5 in local Network with mTLS Certifiacte

  3. Sync DAVx5 in local network –> works

  4. Login to Nextlcoud with browser outside local network –> works

  5. Sync DAVx5 outside local network –> fails

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

{"reqId":"eZUdB7NaJoMXvVx54p51","level":2,"time":"2026-02-22T10:20:58+00:00","remoteAddr":"192.168.178.211","user":"me","app":"core","method":"PROPFIND","url":"/remote.php/dav/calendars/me/familie/","scriptName":"/remote.php","message":"Request does not pass strict cookie check","userAgent":"DAVx5/4.5.9-gplay (dav4jvm; okhttp/5.3.2) Android/16","version":"33.0.0.16","data":{"app":"core"},"id":"699ada3224845"}

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

PASTE

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "check_data_directory_permissions": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "nextcloud.mydomain.de",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "nextcloud.mydomain.de"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "33.0.0.16",
        "overwrite.cli.url": "https:\/\/nextcloud.mydomain.de\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "updatechecker": true,
        "updatedirectory": "\/nc-updater",
        "loglevel": 2,
        "app_install_overwrite": [
            "nextcloud-aio"
        ],
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "log_rotate_size": 10485760,
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "jpeg_quality": 60,
        "enabledPreviewProviders": {
            "1": "OC\\Preview\\Image",
            "2": "OC\\Preview\\MarkDown",
            "3": "OC\\Preview\\MP3",
            "4": "OC\\Preview\\TXT",
            "5": "OC\\Preview\\OpenDocument",
            "6": "OC\\Preview\\Movie",
            "7": "OC\\Preview\\Krita",
            "0": "OC\\Preview\\Imaginary",
            "23": "OC\\Preview\\ImaginaryPDF"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "mail_smtpmode": "smtp",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": 30,
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Shared",
        "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
        "upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
        "maintenance_window_start": 100,
        "allow_local_remote_servers": true,
        "davstorage.request_timeout": 3600,
        "documentation_url.server_logs": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/5425",
        "htaccess.RewriteBase": "\/",
        "dbpersistent": false,
        "auth.bruteforce.protection.enabled": true,
        "ratelimit.protection.enabled": true,
        "files_external_allow_create_new_local": false,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "onlyoffice": {
            "editors_check_interval": 0,
            "jwt_secret": "***REMOVED SENSITIVE VALUE***",
            "jwt_header": "AuthorizationJwt"
        },
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
        "config_preset": 2,
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": true,
        "mail_smtpport": "587",
        "mail_sendmailmode": "smtp",
        "mail_smtpstreamoptions": {
            "ssl": {
                "allow_self_signed": false,
                "verify_peer": true,
                "verify_peer_name": true
            }
        },
        "AIO_VERSION": "v12.7.0",
        "DOMAIN": "nextcloud.mydomain.de"
    },
    "apps": {
        "activity": {
            "enabled": "yes",
            "types": "filesystem",
            "installed_version": "6.0.0-dev.0"
        },
        "admin_audit": {
            "installed_version": "1.23.0",
            "types": "logging",
            "enabled": "yes",
            "logfile": "\/var\/www\/html\/data\/audit.log"
        },
        "app_api": {
            "types": "",
            "installed_version": "33.0.0",
            "enabled": "no"
        },
        "backgroundjob": {
            "lastjob": "52855462516432897"
        },
        "bruteForce": {
            "whitelist_1": "192.168.178.50\/24",
            "whitelist_1_comment": "Desktop"
        },
        "bruteforcesettings": {
            "enabled": "yes",
            "types": "",
            "installed_version": "6.0.0-dev.0"
        },
        "calendar": {
            "installed_version": "6.2.0",
            "types": "",
            "enabled": "yes"
        },
        "circles": {
            "enabled": "yes",
            "types": "filesystem,dav",
            "installed_version": "33.0.0",
            "loopback_tmp_scheme": "https",
            "migration_22": "1",
            "migration_run": "0",
            "loopback_tmp_path": "\/",
            "maintenance_run": "0",
            "maintenance_update": "{\"3\":1771755559,\"2\":1771756155,\"1\":1771756453}"
        },
        "cloud_federation_api": {
            "enabled": "yes",
            "types": "filesystem",
            "installed_version": "1.17.0"
        },
        "comments": {
            "enabled": "yes",
            "types": "logging",
            "installed_version": "1.23.0"
        },
        "contacts": {
            "installed_version": "8.3.3",
            "types": "dav",
            "enabled": "yes"
        },
        "contactsinteraction": {
            "enabled": "yes",
            "types": "dav",
            "installed_version": "1.14.1"
        },
        "core": {
            "vendor": "nextcloud",
            "installedat": "1771504923.6900",
            "lastupdatedat": 1771755832,
            "public_files": "files_sharing\/public.php",
            "moveavatarsdone": "yes",
            "previewsCleanedUp": "1",
            "lastupdateResult": "[]",
            "backgroundjobs_mode": "cron",
            "metadataGenerationDone": true,
            "previewMovedDone": true,
            "lastcron": 1771756453,
            "emailTestSuccessful": "1",
            "shareapi_default_expire_date": true,
            "shareapi_enforce_expire_date": true,
            "oc.integritycheck.checker": [],
            "files_metadata": {
                "photos-original_date_time": {
                    "value": null,
                    "type": "int",
                    "etag": "",
                    "indexed": true,
                    "editPermission": 0
                },
                "photos-exif": {
                    "value": null,
                    "type": "array",
                    "etag": "",
                    "indexed": false,
                    "editPermission": 0
                },
                "photos-ifd0": {
                    "value": null,
                    "type": "array",
                    "etag": "",
                    "indexed": false,
                    "editPermission": 0
                },
                "photos-size": {
                    "value": null,
                    "type": "array",
                    "etag": "",
                    "indexed": false,
                    "editPermission": 0
                },
                "blurhash": {
                    "value": null,
                    "type": "string",
                    "etag": "66fc5e16f0fbc33e135a424ecd06f506",
                    "indexed": false,
                    "editPermission": 0
                }
            }
        },
        "dashboard": {
            "enabled": "yes",
            "types": "",
            "installed_version": "7.13.0"
        },
        "dav": {
            "enabled": "yes",
            "types": "filesystem",
            "installed_version": "1.36.0",
            "hasCustomDefaultContact": false,
            "regeneratedBirthdayCalendarsForYearFix": "yes",
            "buildCalendarSearchIndex": "yes",
            "buildCalendarReminderIndex": "yes",
            "chunks_migrated": "1",
            "enableDefaultContact": false,
            "create_example_event": false,
            "builtSocialSearchIndex": true,
            "system_addressbook_exposed": false
        },
        "deck": {
            "installed_version": "1.17.0",
            "types": "dav",
            "enabled": "yes"
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "types": "",
            "installed_version": "1.23.0"
        },
        "federation": {
            "enabled": "yes",
            "types": "authentication",
            "installed_version": "1.23.0"
        },
        "files": {
            "enabled": "yes",
            "types": "filesystem",
            "installed_version": "2.5.0",
            "mimetype_version": "33.0.0.16"
        },
        "files_downloadlimit": {
            "enabled": "yes",
            "types": "",
            "installed_version": "5.1.0-dev.0"
        },
        "files_external": {
            "installed_version": "1.25.1",
            "types": "filesystem",
            "enabled": "yes",
            "allow_user_mounting": false
        },
        "files_fulltextsearch": {
            "files_local": true,
            "files_external": 1,
            "files_group_folders": false,
            "files_size": 20,
            "files_open_result_directly": true,
            "installed_version": "33.0.0",
            "types": "filesystem",
            "files_pdf": true,
            "files_office": true,
            "enabled": "no"
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "types": "",
            "installed_version": "6.0.0-dev.0"
        },
        "files_reminders": {
            "enabled": "yes",
            "types": "",
            "installed_version": "1.6.0"
        },
        "files_sharing": {
            "enabled": "yes",
            "types": "filesystem",
            "installed_version": "1.25.2"
        },
        "files_trashbin": {
            "enabled": "yes",
            "types": "filesystem,dav",
            "installed_version": "1.23.0",
            "background_job_expire_trash_offset": 0
        },
        "files_versions": {
            "enabled": "yes",
            "types": "filesystem,dav",
            "installed_version": "1.26.0"
        },
        "firstrunwizard": {
            "enabled": "yes",
            "types": "",
            "installed_version": "6.0.0-dev.0"
        },
        "fulltextsearch": {
            "app_navigation": true,
            "installed_version": "33.0.0",
            "types": "",
            "enabled": "no",
            "search_platform": "OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatform"
        },
        "fulltextsearch_elasticsearch": {
            "installed_version": "33.0.0",
            "enabled": "no",
            "types": "",
            "elastic_host": "http:\/\/elastic:08b9125652235db70735dcc2bc52d48afa2c65e7d4fdf075@nextcloud-aio-fulltextsearch:9200",
            "elastic_index": "nextcloud-aio"
        },
        "guests": {
            "installed_version": "4.6.0",
            "types": "authentication",
            "enabled": "yes"
        },
        "logreader": {
            "enabled": "yes",
            "types": "logging",
            "installed_version": "6.0.0"
        },
        "lookup_server_connector": {
            "enabled": "yes",
            "types": "authentication",
            "installed_version": "1.21.0"
        },
        "mail": {
            "installed_version": "5.7.0",
            "types": "",
            "enabled": "yes"
        },
        "nextcloud-aio": {
            "installed_version": "0.8.0",
            "types": "",
            "enabled": "yes"
        },
        "nextcloud_announcements": {
            "enabled": "yes",
            "installed_version": "5.0.0",
            "types": "logging",
            "pub_date": "Thu, 24 Oct 2019 00:00:00 +0200"
        },
        "notes": {
            "installed_version": "4.13.0",
            "types": "",
            "enabled": "yes"
        },
        "notifications": {
            "enabled": "yes",
            "types": "logging",
            "installed_version": "6.0.0"
        },
        "notify_push": {
            "installed_version": "1.3.0",
            "types": "filesystem",
            "enabled": "yes",
            "base_endpoint": "https:\/\/nextcloud.mydomain.de\/push"
        },
        "oauth2": {
            "enabled": "yes",
            "types": "authentication",
            "installed_version": "1.21.0"
        },
        "onlyoffice": {
            "jwt_secret": "***REMOVED SENSITIVE VALUE***",
            "DocumentServerUrl": "https:\/\/nextcloud.mydomain.de\/onlyoffice"
        },
        "password_policy": {
            "enabled": "yes",
            "types": "authentication",
            "installed_version": "5.0.0-dev.0"
        },
        "photos": {
            "enabled": "yes",
            "types": "dav,authentication",
            "installed_version": "6.0.0-dev.0",
            "lastPlaceMappedUser": "admin",
            "lastPlaceMappingDone": "true"
        },
        "preview": {
            "jpeg_quality": "60"
        },
        "privacy": {
            "enabled": "yes",
            "types": "",
            "installed_version": "5.0.0-dev.0"
        },
        "profile": {
            "enabled": "yes",
            "types": "",
            "installed_version": "1.2.0"
        },
        "provisioning_api": {
            "enabled": "yes",
            "types": "prevent_group_restriction",
            "installed_version": "1.23.0"
        },
        "recommendations": {
            "enabled": "yes",
            "types": "",
            "installed_version": "6.0.0-dev.0"
        },
        "related_resources": {
            "enabled": "yes",
            "types": "",
            "installed_version": "4.0.0-dev.0"
        },
        "richdocuments": {
            "enabled": "yes",
            "installed_version": "10.1.0",
            "types": "filesystem,prevent_group_restriction",
            "wopi_allowlist": "192.168.178.230,127.0.0.0\/8,192.168.0.0\/16,172.16.0.0\/12,10.0.0.0\/8,100.64.0.0\/10,fd00::\/8,::1\/128",
            "wopi_url": "http:\/\/nextcloud-aio-apache:23973",
            "wopi_callback_url": "http:\/\/nextcloud-aio-apache:23973",
            "public_wopi_url": "https:\/\/nextcloud.mydomain.de",
            "doc_format": "ooxml"
        },
        "serverinfo": {
            "enabled": "yes",
            "types": "",
            "installed_version": "5.0.0-dev.0",
            "cached_count_appdata_files": 406,
            "size_appdata_storage": 8345530,
            "cached_count_filecache": 112570,
            "cached_count_storages": 11
        },
        "settings": {
            "enabled": "yes",
            "types": "",
            "installed_version": "1.16.0"
        },
        "sharebymail": {
            "enabled": "yes",
            "types": "filesystem",
            "installed_version": "1.23.0"
        },
        "snappymail": {
            "enabled": "no",
            "installed_version": "2.38.2",
            "types": ""
        },
        "support": {
            "enabled": "yes",
            "types": "session",
            "SwitchUpdaterServerHasRun": "yes",
            "installed_version": "5.0.0"
        },
        "survey_client": {
            "enabled": "yes",
            "types": "",
            "installed_version": "5.0.0-dev.0"
        },
        "suspicious_login": {
            "installed_version": "11.0.0-dev.0",
            "types": "authentication",
            "enabled": "yes"
        },
        "systemtags": {
            "enabled": "yes",
            "types": "logging",
            "installed_version": "1.23.0"
        },
        "tasks": {
            "installed_version": "0.17.1",
            "types": "",
            "enabled": "yes"
        },
        "text": {
            "enabled": "yes",
            "types": "dav",
            "installed_version": "7.0.0-dev.3"
        },
        "theming": {
            "enabled": "yes",
            "types": "logging",
            "installed_version": "2.8.0"
        },
        "thesearchpage": {
            "installed_version": "2.1.0",
            "types": "",
            "enabled": "yes"
        },
        "twofactor_backupcodes": {
            "types": "",
            "installed_version": "1.22.0",
            "enabled": "yes"
        },
        "twofactor_nextcloud_notification": {
            "installed_version": "7.0.0",
            "types": "",
            "enabled": "yes"
        },
        "twofactor_totp": {
            "installed_version": "15.0.0-dev.0",
            "types": "",
            "enabled": "yes"
        },
        "twofactor_webauthn": {
            "installed_version": "2.6.0",
            "types": "",
            "enabled": "yes"
        },
        "unsplash": {
            "enabled": "no",
            "installed_version": "3.1.0",
            "types": ""
        },
        "updatenotification": {
            "enabled": "yes",
            "types": "",
            "installed_version": "1.23.0",
            "update_check_errors": 0,
            "notify_groups": "[\"admin\"]"
        },
        "user_status": {
            "types": "",
            "installed_version": "1.13.0",
            "enabled": "yes"
        },
        "viewer": {
            "enabled": "yes",
            "types": "",
            "installed_version": "6.0.0-dev.0"
        },
        "weather_status": {
            "enabled": "yes",
            "types": "",
            "installed_version": "1.13.0"
        },
        "webhook_listeners": {
            "enabled": "yes",
            "types": "filesystem",
            "installed_version": "1.5.0"
        },
        "whiteboard": {
            "enabled": "no",
            "installed_version": "1.5.6",
            "types": "",
            "collabBackendUrl": "https:\/\/nextcloud.mydomain.de\/whiteboard",
            "jwt_secret_key": "***REMOVED SENSITIVE VALUE***"
        },
        "workflowengine": {
            "enabled": "yes",
            "types": "filesystem",
            "installed_version": "2.15.0"
        }
    }
}

Apps

The output of occ app:list (if possible).

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.