Remove generator meta tag

hello everyone ,
i have to remove ghost theme meta tag generator
<meta name="generator" content="Ghost 3.10" />
as you can see this meta tag show ghost version.
thanks in advance

Hey @abdalla_saleh :wave:
Can I ask why you want to do this? :slight_smile:

Your boss wants to hide the fact he’s using Ghost, no?

I’d be interested to know why. If it’s for security reasons then there’s no need, this removal would make no difference. Removing it can be done by removing the {{ghost_head}} helper, however you’ll need to replace the other meta tags with custom code :slight_smile:

2 Likes

Hi @abdalla_saleh ,

Removing {{ghost_head}} would only give us a false sense of security, there are numerous other ways that a malicious agent can use to find out the version of Ghost or any hosted app of any complexity. Furthermore, the metrics which we can access with that metadata is very important for the project.

We do take security very seriously, so thank you for the bug report.

The way we’re approaching issues like this is to make messaging around security vulnerabilities and the need to upgrade clearer, and simplifying the upgrade process itself. The same problem I got in Random Name Generator but now it works proper.

Hi Andrew,

Thanks for this clarification.

Although I can understand that this header provides hooks to inject additional scripts and styles.
I don’t see the use of the version.

The version information will only give more insight to the person scanning your site with no additional value to the server itself.

That being said, is there a way to remove only the version information from the generator tag?

Best regards,
Angel

As the code is open source, you could remove the following lines in the {{ghost_head}} helper: https://github.com/TryGhost/Ghost/blob/main/core/frontend/helpers/ghost_head.js#L183-L184

            head.push('<meta name="generator" content="Ghost ' +
                escapeExpression(safeVersion) + '" />');

by forking the repository and by using your adapted version.

1 Like