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

chore(gatsby): perfect GatsbyConfig.proxy type #36548

Merged
merged 1 commit into from
Sep 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions packages/gatsby/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ export interface GraphQLTypegenOptions {
generateOnBuild?: boolean
}

type Proxy = {
prefix: string
url: string
}

/**
* Gatsby configuration API.
*
Expand Down Expand Up @@ -290,10 +295,7 @@ export interface GatsbyConfig {
* Setting the proxy config option will tell the develop server to proxy any unknown requests to your specified server.
* @see https://www.gatsbyjs.com/docs/api-proxy/
* */
proxy?: {
prefix: string
url: string
}
proxy?: Proxy | Proxy[]
/**
* A list of trusted URLs that will be proxied for use with the gatsby-script off-main-thread strategy.
* @see https://gatsby.dev/gatsby-script
Expand Down