mirror of
https://github.com/timvisee/send.git
synced 2025-10-06 02:39:57 +02:00
implemented download tokens
This commit is contained in:
parent
87d46f7ef5
commit
81e9d81dab
26 changed files with 271 additions and 126 deletions
|
@ -120,12 +120,18 @@ module.exports = function(app) {
|
|||
app.get('/app.webmanifest', language, require('./webmanifest'));
|
||||
app.get(`/download/:id${ID_REGEX}`, language, pages.download);
|
||||
app.get('/unsupported/:reason', language, pages.unsupported);
|
||||
app.get(`/api/download/:id${ID_REGEX}`, auth.hmac, require('./download'));
|
||||
app.get(`/api/download/token/:id${ID_REGEX}`, auth.hmac, require('./token'));
|
||||
app.get(`/api/download/:id${ID_REGEX}`, auth.dlToken, require('./download'));
|
||||
app.get(
|
||||
`/api/download/blob/:id${ID_REGEX}`,
|
||||
auth.hmac,
|
||||
auth.dlToken,
|
||||
require('./download')
|
||||
);
|
||||
app.post(
|
||||
`/api/download/done/:id${ID_REGEX}`,
|
||||
auth.dlToken,
|
||||
require('./done.js')
|
||||
);
|
||||
app.get(`/api/exists/:id${ID_REGEX}`, require('./exists'));
|
||||
app.get(`/api/metadata/:id${ID_REGEX}`, auth.hmac, require('./metadata'));
|
||||
app.get('/api/filelist/:id([\\w-]{16})', auth.fxa, filelist.get);
|
||||
|
@ -133,12 +139,7 @@ module.exports = function(app) {
|
|||
// app.post('/api/upload', auth.fxa, require('./upload'));
|
||||
app.post(`/api/delete/:id${ID_REGEX}`, auth.owner, require('./delete'));
|
||||
app.post(`/api/password/:id${ID_REGEX}`, auth.owner, require('./password'));
|
||||
app.post(
|
||||
`/api/params/:id${ID_REGEX}`,
|
||||
auth.owner,
|
||||
auth.fxa,
|
||||
require('./params')
|
||||
);
|
||||
app.post(`/api/params/:id${ID_REGEX}`, auth.owner, require('./params'));
|
||||
app.post(`/api/info/:id${ID_REGEX}`, auth.owner, require('./info'));
|
||||
app.post(`/api/report/:id${ID_REGEX}`, auth.hmac, require('./report'));
|
||||
app.post('/api/metrics', require('./metrics'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue