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 5c6f8c0a
authored
Nov 27, 2015
by
Girish Ramakrishnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use APP_ORIGIN instead of HOSTNAME
1 parent
d3ceae29
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
app.js
app.js
View file @
5c6f8c0
...
@@ -29,7 +29,7 @@ router.put ('/api/files/*', auth.ldap, multipart, files.put);
...
@@ -29,7 +29,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
);
// welcome screen in case / does not serve up any file yet
// welcome screen in case / does not serve up any file yet
var
appUrl
=
process
.
env
.
HOSTNAME
?
'https://'
+
process
.
env
.
HOSTNAME
:
'http://localhost:3000'
;
var
appUrl
=
process
.
env
.
APP_ORIGIN
?
process
.
env
.
APP_ORIGIN
:
'http://localhost:3000'
;
router
.
get
(
'/'
,
function
(
req
,
res
)
{
res
.
status
(
200
).
send
(
ejs
.
render
(
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'/app/welcome.html'
),
'utf8'
),
{
appUrl
:
appUrl
}));
});
router
.
get
(
'/'
,
function
(
req
,
res
)
{
res
.
status
(
200
).
send
(
ejs
.
render
(
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'/app/welcome.html'
),
'utf8'
),
{
appUrl
:
appUrl
}));
});
app
.
use
(
morgan
(
'dev'
));
app
.
use
(
morgan
(
'dev'
));
...
...
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