📜  nuxt 将流量从 http 重定向到 https - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:38.838000             🧑  作者: Mango

代码示例1
# Try this if you want to enable it only for production: 
import redirectSSL from 'redirect-ssl';

export default {
  serverMiddleware: [redirectSSL.create({enabled: process.env.NODE_ENV === 'production'})]
  }