Nuxt.js: Hiding references to __nuxt in the scripts and the template ID

Created on 6 Oct 2017  Â·  7Comments  Â·  Source: nuxt/nuxt.js

I've been reading the source code and found out that window.__nuxt__ and the id for the App component #__nuxt are hardcoded. For security reasons I would like to hide what technology is powering my site, do you have plans on having those as options or should I work on my own fork?

This feature request is available on Nuxt.js community (#c1605)
enhancement feature-request

Most helpful comment

I will take a look at this soon.

All 7 comments

Also, I would like to have the data passed to window.__NUXT__={...} obfuscated. My store includes details about roles/permissions, basic user information, etc.

It doesn't need to be cryptographically encoded, but maybe base64/62 encoded (as savvy users could just inspect the instances via dev tools). But not having it in plaintext would be a bonus.

Maybe something like:

window.__NUXT__ = stateParser(".....")

Where stateParser decodes the string and then JSON parses it

Or incorporate the de-obfuscation into the part of Nuxt that checks the window.__NUXT__ variable (i.e. if a string, try and decode it)

It could then be made into an optional build flag to either obfuscate or not.

I will take a look at this soon.

Any news about this feature?

Would also like to use lz-string or base64 type encoding to obfuscate the json objects

I have the same question ,how to do with it?

window.__NUXT__ = stateParser(".....")

I have the same question,how to do whith it?

Which files do I need to modify

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

surmon-china picture surmon-china  Â·  3Comments

danieloprado picture danieloprado  Â·  3Comments

vadimsg picture vadimsg  Â·  3Comments

o-alexandrov picture o-alexandrov  Â·  3Comments

maicong picture maicong  Â·  3Comments