2017-11-24 1 views

답변

0

예.
실제로 리디렉션이 발생하면 302 found 응답 후에 클라이언트가 리디렉션 된 URL에 요청을합니다.

예 :

app.use('/some/route', (req, res, next) => { 
    console.log('some middleware') 
    next() 
}) 

app.get('/some/route', (req, res) => { 
    res.end() 
}) 

app.get('/', (req, res) => { 
    res.redirect('/some/route') 
}) 

시험 :

$ curl -L yourdomain.com/ // -> some middleware