Skip to content

PROPFIND 404 when running behind reverse proxy #6

@waja

Description

@waja

When running behind reverse proxy there seems to be troubles with PROFIND. When connecting straight to the radical httpd (port 5232) it works well.

Browser console:

'PROPFIND https://test.org/.web/'] code: '404' status: 'error'

Radicale log:

radicale_1  | [7f2e88414ae8] DEBUG: Sanitized script name: ''
radicale_1  | [7f2e88414ae8] DEBUG: Sanitized path: '/.web/'
radicale_1  | [7f2e88414ae8] INFO: Successful login: 'waja'
radicale_1  | [7f2e88414ae8] DEBUG: Request content:
radicale_1  | <?xml version="1.0"?>
radicale_1  | <propfind xmlns="DAV:">
radicale_1  |   <prop>
radicale_1  |     <current-user-principal />
radicale_1  |   </prop>
radicale_1  | </propfind>
radicale_1  | 
radicale_1  | [7f2e88414ae8] DEBUG: Unsafe path '.web' requested from storage: Can't translate name safely to filesystem: '.web'
radicale_1  | Traceback (most recent call last):
radicale_1  |   File "/usr/local/lib/python3.6/site-packages/radicale/storage.py", line 856, in discover
radicale_1  |     filesystem_path = path_to_filesystem(folder, sane_path)
radicale_1  |   File "/usr/local/lib/python3.6/site-packages/radicale/storage.py", line 301, in path_to_filesystem
radicale_1  |     raise UnsafePathError(part)
radicale_1  | radicale.storage.UnsafePathError: Can't translate name safely to filesystem: '.web'

config.js config:

var globalNetworkCheckSettings={                                                
        href: location.protocol+'//'+location.hostname+                         
                (location.port ? ':'+location.port: '')+                        
                location.pathname.replace(RegExp('/+[^/]+/*(index\.html)?$'),'')+'/',
                '/',                                                            
        timeOut: 90000,                                                         
        lockTimeOut: 10000,                                                     
        checkContentType: true,                                                 
        settingsAccount: true,                                                  
        delegation: true,                                                       
        additionalResources: [],                                                
        hrefLabel: null,                                                        
        forceReadOnly: null,                                                    
        ignoreAlarms: false,                                                    
        backgroundCalendars: []                                                 
}

Nginx config:

  location / {                                                                  
    proxy_set_header Host $host;                                                
    proxy_pass http://localhost:5232;                                          
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;               
    proxy_pass_header Authorization;                                                                                     
 }          

When connected to radicale httpd the request is indeed PROPFIND http://localhost:5232/.

Might this be a configuration issue or a bug?

Thanks, Jan.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions