Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nuxt redirect traffic from http to https

# 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'})]
  }
 
PREVIOUS NEXT
Tagged: #nuxt #redirect #traffic #http #https
ADD COMMENT
Topic
Name
3+8 =