<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>meta | SDT 攻城獅區</title>
	<atom:link href="https://sdt.hameba.tw/tag/meta/feed/" rel="self" type="application/rss+xml" />
	<link>https://sdt.hameba.tw</link>
	<description>由Steven, Der, Ted 三位高級打字員所組成，是三位工程師(攻城獅)所維護的技術分享平台，或許偶爾會分享一些日常，有任何問題或是錯誤的部分，歡迎留言告訴我們！</description>
	<lastBuildDate>Thu, 27 Feb 2020 16:33:25 +0800</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.3</generator>

<image>
	<url>https://sdt.hameba.tw/wp-content/uploads/2020/02/hameba_favicon-150x150.png</url>
	<title>meta | SDT 攻城獅區</title>
	<link>https://sdt.hameba.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Gatsby (React) 移除meta顯示名稱及版本</title>
		<link>https://sdt.hameba.tw/492/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gatsby-react-%25e7%25a7%25bb%25e9%2599%25a4meta%25e9%25a1%25af%25e7%25a4%25ba%25e5%2590%258d%25e7%25a8%25b1%25e5%258f%258a%25e7%2589%2588%25e6%259c%25ac</link>
				<comments>https://sdt.hameba.tw/492/#respond</comments>
				<pubDate>Sun, 26 Jan 2020 02:02:37 +0000</pubDate>
		<dc:creator><![CDATA[Hsu Steven]]></dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Gatsby]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[react]]></category>

		<guid isPermaLink="false">https://sdt.hameba.tw/?p=492</guid>
				<description><![CDATA[<p>今天早上看到之前所做的 縮網址工具，用偵測工具發現顯示版本， 網站在head裡顯示一些開發工具的框架及版本其實 &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/492/" class="more-link">閱讀全文<span class="screen-reader-text">〈Gatsby (React) 移除meta顯示名稱及版本〉</span></a></p>
The post <a href="https://sdt.hameba.tw/492/">Gatsby (React) 移除meta顯示名稱及版本</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>今天早上看到之前所做的 <a href="https://url.hameba.tw" target="_blank" rel="noopener noreferrer">縮網址工具</a>，用偵測工具發現顯示版本，</p>
<p>網站在head裡顯示一些開發工具的框架及版本其實都是有安全問題的疑慮，</p>
<p><span id="more-492"></span></p>
<p><img class="alignnone size-large wp-image-493" src="https://sdt.hameba.tw/wp-content/uploads/2020/01/截圖-2020-01-26-上午9.51.02-1024x339.png" alt="gatsby show version" width="840" height="278" srcset="https://sdt.hameba.tw/wp-content/uploads/2020/01/截圖-2020-01-26-上午9.51.02-1024x339.png?v=1580003702 1024w, https://sdt.hameba.tw/wp-content/uploads/2020/01/截圖-2020-01-26-上午9.51.02-300x99.png?v=1580003702 300w, https://sdt.hameba.tw/wp-content/uploads/2020/01/截圖-2020-01-26-上午9.51.02-768x255.png?v=1580003702 768w, https://sdt.hameba.tw/wp-content/uploads/2020/01/截圖-2020-01-26-上午9.51.02-1536x509.png?v=1580003702 1536w, https://sdt.hameba.tw/wp-content/uploads/2020/01/截圖-2020-01-26-上午9.51.02-1200x398.png?v=1580003702 1200w, https://sdt.hameba.tw/wp-content/uploads/2020/01/截圖-2020-01-26-上午9.51.02.png?v=1580003702 1822w" sizes="(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px" /></p>
<p>Gatsby build出來的default文件在head可以找到以下的詞，</p><pre class="crayon-plain-tag">&lt;meta name="generator" content="Gatsby 2.18.17" /&gt;</pre><p>這樣一來有心人士就可以得知此版，依照此版漏洞做攻擊，</p>
<p>幸好到官網查詢一下，不難解決。</p><pre class="crayon-plain-tag"># 安裝gatsby套件
$ npm i -S gatsby-plugin-remove-generator</pre><p>找gatsby-config.js 做plugin設定</p><pre class="crayon-plain-tag">// default
module.exports = {
  ...
  plugins: [
    'gatsby-plugin-remove-generator',
  ]
};


// options
module.exports = {
  ...
  plugins: [
    {
      resolve: 'gatsby-plugin-remove-generator',
      options: {
        // Only remove the Gatsby version number instead of the whole node
        removeVersionOnly: true,
        // Customise the generator string altogether.
        // Note: This has the highest precedence of the available options.
        content: 'Custom string'
      },
  ]
};</pre><p>也可以使用option方式，自定義content，混淆有心人士。</p>
<p>&nbsp;</p>
<p>Reference</p>
<p><a href="https://www.gatsbyjs.org/packages/gatsby-plugin-remove-generator/" target="_blank" rel="noopener noreferrer">https://www.gatsbyjs.org/packages/gatsby-plugin-remove-generator/</a></p>The post <a href="https://sdt.hameba.tw/492/">Gatsby (React) 移除meta顯示名稱及版本</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/492/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
	</channel>
</rss>
