Next.js Logo
官方文件使用案例英文官網

說明文件

  • 快速開始
  • 基礎功能

    • 頁面
    • 獲取資料

      • 概述
      • getServerSideProps
      • getStaticPaths
      • getStaticProps
      • 增量靜態生成
      • 客戶端
    • 內建支援 CSS
    • 版面佈局
    • 圖片最佳化
    • 字體最佳化
    • 處理靜態檔案
    • 快速重新整理
    • ESLint
    • TypeScript
    • 環境變數
    • 支援瀏覽器和語言版本
    • 使用外部 Script

    路由

    • 介紹
    • 動態路由
    • 透過程式切換頁面
    • 切換頁面但不載入資料
  • 邁向成品
  • 測試

API 參考文件

  • CLI
  • Create Next App
  • next/router
  • next/link
  • next/image
  • next/script
  • next/head
  • next/amp
  • next/server
  • next/future/image
  • Edge Runtime
  • Data Fetching

    • getInitialProps
    • getServerSideProps
    • getStaticPaths
    • getStaticProps
  • Static Optimization Indicator
  • next.config.js

    • Introduction
    • Environment Variables
    • Base Path
    • Rewrites
    • Redirects
    • Custom Headers
    • Custom Page Extensions
    • CDN Support with Asset Prefix
    • Custom Webpack Config
    • Compression
    • Runtime Configuration
    • Disabling x-powered-by
    • Disabling ETag Generation
    • Disabling HTTP Keep-Alive
    • Setting a custom build directory
    • Configuring the Build ID
    • Configuring onDemandEntries
    • Ignoring ESLint
    • Ignoring TypeScript Errors
    • exportPathMap
    • Trailing Slash
    • React Strict Mode
    • URL Imports
    • Build indicator

Disabling x-powered-by

By default Next.js will add the x-powered-by header. To opt-out of it, open next.config.js and disable the poweredByHeader config:

module.exports = { poweredByHeader: false, }

Related

Introduction to next.config.js: Learn more about the configuration file used by Next.js.