hide public profile button if no username
This commit is contained in:
17
app.js
17
app.js
@ -121,8 +121,11 @@ var trusted = [
|
|||||||
'*.bootstrapcdn.com',
|
'*.bootstrapcdn.com',
|
||||||
'*.cloudflare.com',
|
'*.cloudflare.com',
|
||||||
'localhost:3001',
|
'localhost:3001',
|
||||||
'localhost:3000'
|
'ws://localhost:3001/',
|
||||||
|
'http://localhost:3001',
|
||||||
|
'localhost:3000',
|
||||||
|
'ws://localhost:3000/',
|
||||||
|
'http://localhost:3000'
|
||||||
];
|
];
|
||||||
|
|
||||||
debug(trusted);
|
debug(trusted);
|
||||||
@ -134,10 +137,8 @@ app.use(helmet.contentSecurityPolicy({
|
|||||||
'wss://*.rafflecopter.com',
|
'wss://*.rafflecopter.com',
|
||||||
'https://*.rafflecopter.com',
|
'https://*.rafflecopter.com',
|
||||||
'ws://www.freecodecamp.com',
|
'ws://www.freecodecamp.com',
|
||||||
'ws://localhost:3001/',
|
|
||||||
'http://localhost:3001',
|
|
||||||
'http://www.freecodecamp.com'
|
'http://www.freecodecamp.com'
|
||||||
],
|
].concat(trusted),
|
||||||
styleSrc: trusted,
|
styleSrc: trusted,
|
||||||
imgSrc: [
|
imgSrc: [
|
||||||
'*.evernote.com',
|
'*.evernote.com',
|
||||||
@ -150,20 +151,20 @@ app.use(helmet.contentSecurityPolicy({
|
|||||||
'graph.facebook.com',
|
'graph.facebook.com',
|
||||||
'*.githubusercontent.com',
|
'*.githubusercontent.com',
|
||||||
'*.googleusercontent.com',
|
'*.googleusercontent.com',
|
||||||
'*'
|
'*' /* allow all input since we have user submitted images for public profile*/
|
||||||
].concat(trusted),
|
].concat(trusted),
|
||||||
fontSrc: ['*.googleapis.com'].concat(trusted),
|
fontSrc: ['*.googleapis.com'].concat(trusted),
|
||||||
mediaSrc: [
|
mediaSrc: [
|
||||||
'*.amazonaws.com',
|
'*.amazonaws.com',
|
||||||
'*.twitter.com'
|
'*.twitter.com'
|
||||||
],
|
].concat(trusted),
|
||||||
frameSrc: [
|
frameSrc: [
|
||||||
'*.gitter.im',
|
'*.gitter.im',
|
||||||
'*.vimeo.com',
|
'*.vimeo.com',
|
||||||
'*.twitter.com',
|
'*.twitter.com',
|
||||||
'*.rafflecopter.com',
|
'*.rafflecopter.com',
|
||||||
'*.youtube.com'
|
'*.youtube.com'
|
||||||
],
|
].concat(trusted),
|
||||||
reportOnly: false, // set to true if you only want to report errors
|
reportOnly: false, // set to true if you only want to report errors
|
||||||
setAllHeaders: false, // set to true if you want to set all headers
|
setAllHeaders: false, // set to true if you want to set all headers
|
||||||
safari5: false // set to true if you want to force buggy CSP in Safari 5
|
safari5: false // set to true if you want to force buggy CSP in Safari 5
|
||||||
|
@ -224,7 +224,8 @@ block content
|
|||||||
.panel-heading.text-center Actions
|
.panel-heading.text-center Actions
|
||||||
.panel-body
|
.panel-body
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
a.btn.btn-lg.btn-block.btn-info.btn-link-social(href='/campers/#{user.profile.username}') Check out my Public Profile
|
if (user.profile.username)
|
||||||
|
a.btn.btn-lg.btn-block.btn-info.btn-link-social(href='/campers/#{user.profile.username}') Check out my Public Profile
|
||||||
a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='/') Take me to my current challenge
|
a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='/') Take me to my current challenge
|
||||||
a.btn.btn-lg.btn-block.btn-warning.btn-link-social(href='/logout') Sign out
|
a.btn.btn-lg.btn-block.btn-warning.btn-link-social(href='/logout') Sign out
|
||||||
br
|
br
|
||||||
|
Reference in New Issue
Block a user