File tree 1 file changed +4
-10
lines changed
1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -19,21 +19,15 @@ sitemaps.add('/sitemap.xml', (req) => {
19
19
20
20
const hostnameArray = req . headers . host . split ( '.' ) ;
21
21
let subdomain ;
22
-
22
+ let settingsJSON ;
23
23
if ( process . env . NODE_ENV === 'development' ) {
24
24
subdomain = Meteor . settings . public . developmentSubdomain ;
25
- console . log ( 'sitemap - development' ) ;
26
- console . log ( Meteor . settings . public ) ;
27
- } else if ( hostnameArray . length > 1 ) {
28
- subdomain = hostnameArray [ 0 ] ;
29
- console . log ( 'sitemap - Not development' ) ;
30
- console . log ( process . env ) ;
31
- console . log ( hostnameArray ) ;
25
+ } else if ( hostnameArray . length > 1 && process . env && process . env . METEOR_SETTINGS ) {
26
+ settingsJSON = JSON . parse ( process . env . METEOR_SETTINGS ) ;
27
+ subdomain = settingsJSON . public . developmentSubdomain ;
32
28
} else {
33
29
subdomain = '' ;
34
30
window . location . assign ( '/404' ) ;
35
- console . log ( 'sitemap - 404' ) ;
36
- console . log ( process . env ) ;
37
31
}
38
32
39
33
const sitemap = [ ] ;
You can’t perform that action at this time.
0 commit comments