Skip to content

Commit aa71a42

Browse files
authored
remove force domain (#466)
1 parent 5d092f3 commit aa71a42

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

config/http.js

+1-10
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ module.exports.http = {
3838
order: [
3939
'startRequestTimer',
4040
'cookieParser',
41-
process.env.NODE_ENV === 'production' ? 'forceDomain' : false,
4241
process.env.NODE_ENV === 'production' ? 'httpsRedirect' : false,
4342
'readRstudioSession',
4443
'session',
@@ -211,15 +210,7 @@ module.exports.http = {
211210
passportSession: require('passport').session(),
212211
httpsRedirect: forceHttpsSchema({
213212
enable: true
214-
}),
215-
forceDomain: function(req, res, next) {
216-
var host = req.header('host');
217-
if (host.match(/^www.rdocumentation\.org$/i)) {
218-
next();
219-
} else {
220-
res.redirect(301, 'https://www.rdocumentation.org' + req.url);
221-
}
222-
}
213+
})
223214
},
224215

225216
locals: {

0 commit comments

Comments
 (0)