Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
PUBLIC
/
surfer-okd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit cfe24a27
authored
Jun 27, 2015
by
Johannes Zellner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix session serialization
1 parent
a90a633f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
app.js
src/auth.js
src/files.js
app.js
View file @
cfe24a2
...
@@ -25,7 +25,7 @@ router.put('/api/files/*', auth.ldap, multipart, files.put);
...
@@ -25,7 +25,7 @@ router.put('/api/files/*', auth.ldap, multipart, files.put);
router
.
delete
(
'/api/files/*'
,
auth
.
ldap
,
files
.
del
);
router
.
delete
(
'/api/files/*'
,
auth
.
ldap
,
files
.
del
);
// healthcheck in case / does not serve up any file yet
// healthcheck in case / does not serve up any file yet
router
.
get
(
'/'
,
function
(
req
,
res
)
{
res
.
send
f
ile
(
path
.
join
(
__dirname
,
'/app/welcome.html'
));
});
router
.
get
(
'/'
,
function
(
req
,
res
)
{
res
.
send
F
ile
(
path
.
join
(
__dirname
,
'/app/welcome.html'
));
});
app
.
use
(
morgan
(
'dev'
));
app
.
use
(
morgan
(
'dev'
));
app
.
use
(
compression
());
app
.
use
(
compression
());
...
...
src/auth.js
View file @
cfe24a2
...
@@ -5,12 +5,12 @@ var passport = require('passport'),
...
@@ -5,12 +5,12 @@ var passport = require('passport'),
passport
.
serializeUser
(
function
(
user
,
done
)
{
passport
.
serializeUser
(
function
(
user
,
done
)
{
console
.
log
(
'serializeUser'
,
user
);
console
.
log
(
'serializeUser'
,
user
);
done
(
null
,
user
.
id
);
done
(
null
,
user
.
u
id
);
});
});
passport
.
deserializeUser
(
function
(
id
,
done
)
{
passport
.
deserializeUser
(
function
(
id
,
done
)
{
console
.
log
(
'deserializeUser'
,
id
);
console
.
log
(
'deserializeUser'
,
id
);
done
(
null
,
{
id
:
id
});
done
(
null
,
{
u
id
:
id
});
});
});
var
LDAP_URL
=
process
.
env
.
LDAP_URL
;
var
LDAP_URL
=
process
.
env
.
LDAP_URL
;
...
...
src/files.js
View file @
cfe24a2
...
@@ -75,7 +75,7 @@ function get(req, res, next) {
...
@@ -75,7 +75,7 @@ function get(req, res, next) {
debug
(
'get'
,
absoluteFilePath
);
debug
(
'get'
,
absoluteFilePath
);
if
(
result
.
isFile
())
return
res
.
send
f
ile
(
absoluteFilePath
);
if
(
result
.
isFile
())
return
res
.
send
F
ile
(
absoluteFilePath
);
if
(
result
.
isDirectory
())
return
res
.
status
(
200
).
send
({
entries
:
fs
.
readdirSync
(
absoluteFilePath
)
});
if
(
result
.
isDirectory
())
return
res
.
status
(
200
).
send
({
entries
:
fs
.
readdirSync
(
absoluteFilePath
)
});
return
next
(
new
HttpError
(
500
,
'unsupported type'
));
return
next
(
new
HttpError
(
500
,
'unsupported type'
));
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment