Skip to content

Commit 9ef1ce7

Browse files
author
Fuchen Shi
authored
Merge pull request #36 from leancloud/fix-https
fix: use static after HttpsRedirect
2 parents f67b776 + 3a0867c commit 9ef1ce7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ var app = express();
1616
app.set('views', path.join(__dirname, 'views'));
1717
app.set('view engine', 'ejs');
1818

19-
app.use(express.static('public'));
20-
2119
// 设置默认超时时间
2220
app.use(timeout('15s'));
2321

@@ -28,6 +26,8 @@ app.enable('trust proxy');
2826
// 需要重定向到 HTTPS 可去除下一行的注释。
2927
// app.use(AV.Cloud.HttpsRedirect());
3028

29+
app.use(express.static('public'));
30+
3131
app.use(bodyParser.json());
3232
app.use(bodyParser.urlencoded({ extended: false }));
3333
app.use(cookieParser());

0 commit comments

Comments
 (0)