summarylogtreecommitdiffstats
path: root/pydiocaddy.conf
blob: 6c723fb1401cff089399b30b460c8e02165a7c32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
http://127.0.0.1:8090 {
    pydiows /ws     {
        pre {
            if {>Cookie} has "AjaXplorer"
            type request
            url http://YOUR_HOSTNAME:YOUR_OPTIONAL_PORT?get_action=keystore_generate_auth_token&device=websocket
            cookie AjaXplorer
            out token
        }
        pre {
            type request
            url http://YOUR_HOSTNAME:YOUR_OPTIONAL_PORT/api/pydio/ws_authenticate?key=TOKENP:TOKENS
            query auth_hash
            query auth_token
            out user
        }
    }
    header /io {
        Access-Control-Allow-Origin http://YOUR_HOSTNAME:YOUR_OPTIONAL_PORT
        Access-Control-Request-Headers *
        Access-Control-Allow-Methods POST
        Access-Control-Allow-Headers Range
        Access-Control-Allow-Credentials true
    }
    pydioupload /io     {
        pre {
            type node
            out node
        }
        pre {
            if {query} has "minisite_session"
            type request
            url http://YOUR_HOSTNAME:YOUR_OPTIONAL_PORT?get_action=keystore_generate_auth_token&device=upload
            query minisite_session
            cookie AjaXplorer_Shared
            out token
        }
        pre {
            if {query} not_has "minisite_session"
            if {>Cookie} has "AjaXplorer="
            type request
            url http://YOUR_HOSTNAME:YOUR_OPTIONAL_PORT?get_action=keystore_generate_auth_token&device=upload
            cookie AjaXplorer
            out token
        }
        pre {
            type request
            url http://YOUR_HOSTNAME:YOUR_OPTIONAL_PORT/api/{repo}/upload/put/{nodedir}?xhr_uploader=true
            header X-File-Direct-Upload request-options
            header X-Pydio-Admin-Auth TOKENP:TOKENS
            header X-File-Name {nodename}
            query *
            out options
        }
        post {
            type request
            url http://YOUR_HOSTNAME:YOUR_OPTIONAL_PORT/api/{repo}/upload/put/{nodedir}?xhr_uploader=true
            header X-File-Direct-Upload upload-finished
            header X-Pydio-Admin-Auth TOKENP:TOKENS
            header X-File-Name {nodename}
            query auth_hash
            query auth_token
            out body
        }
    }
    pydioadmin /admin
    basicauth /admin TOKENP TOKENS
}