File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,7 +125,6 @@ Environment variables (will overwrite other server configs)
125125| HMD_URL_ADDPORT | ` true ` or ` false ` | set to add port on callback url (port 80 or 443 won't applied) (only applied when domain is set) |
126126| HMD_USECDN | ` true ` or ` false ` | set to use CDN resources or not (default is ` true ` ) |
127127| HMD_ALLOW_ANONYMOUS | ` true ` or ` false ` | set to allow anonymous usage (default is ` true ` ) |
128- | HMD_ALLOW_ANONYMOUS_VIEW | ` true ` or ` false ` | set to allow anonymous view note (default is ` true ` ) |
129128| HMD_ALLOW_FREEURL | ` true ` or ` false ` | set to allow new note by accessing not exist note url |
130129| HMD_DB_URL | ` mysql://localhost:3306/database ` | set the db url |
131130| HMD_FACEBOOK_CLIENTID | no example | Facebook API client id |
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ var urladdport = process.env.HMD_URL_ADDPORT ? (process.env.HMD_URL_ADDPORT ===
2020var usecdn = process . env . HMD_USECDN ? ( process . env . HMD_USECDN === 'true' ) : ( ( typeof config . usecdn === 'boolean' ) ? config . usecdn : true ) ;
2121
2222var allowanonymous = process . env . HMD_ALLOW_ANONYMOUS ? ( process . env . HMD_ALLOW_ANONYMOUS === 'true' ) : ( ( typeof config . allowanonymous === 'boolean' ) ? config . allowanonymous : true ) ;
23- var allowanonymousView = process . env . HMD_ALLOW_ANONYMOUS_VIEW ? ( process . env . HMD_ALLOW_ANONYMOUS_VIEW === 'true' ) : ( ( typeof config . allowanonymousView === 'boolean' ) ? config . allowanonymousView : true ) ;
2423
2524var allowfreeurl = process . env . HMD_ALLOW_FREEURL ? ( process . env . HMD_ALLOW_FREEURL === 'true' ) : ! ! config . allowfreeurl ;
2625
@@ -129,7 +128,6 @@ module.exports = {
129128 serverurl : getserverurl ( ) ,
130129 usecdn : usecdn ,
131130 allowanonymous : allowanonymous ,
132- allowanonymousView : allowanonymousView ,
133131 allowfreeurl : allowfreeurl ,
134132 dburl : dburl ,
135133 db : db ,
Original file line number Diff line number Diff line change @@ -123,9 +123,6 @@ function checkViewPermission(req, note) {
123123 else
124124 return true ;
125125 } else {
126- if ( ! config . allowanonymousView && ! req . isAuthenticated ( ) ) {
127- return false ;
128- }
129126 return true ;
130127 }
131128}
You can’t perform that action at this time.
0 commit comments