Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Server): Add express middlewares inside config #23

Merged
merged 2 commits into from
Oct 9, 2018

Conversation

zickat
Copy link
Contributor

@zickat zickat commented Sep 20, 2018

It allow developers to add somme middleware to express (inside app.use())

For exemple, I wanted to have cookie inside my req, so I wanted to add cookie-parser

Use in vue.config.js

const cookieParser = require('cookie-parser');

module.exports = {
  pluginOptions: {
    ssr: {
      middlewares: [cookieParser()]
    },
  },
};

It allow developers to add somme middleware to express (inside app.use())
@Tactless7
Copy link

Nice one !

@maviola5
Copy link

Would love to see this!

@nathanaelphilip
Copy link

nathanaelphilip commented Jul 14, 2020

if anyone is confused as i was, this was modified a bit. this is the new way to add the cookie parse middle ware https://vue-cli-plugin-ssr.netlify.app/guide/configuration.html

Look under: extendServer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants