Skip to content

Commit

Permalink
docs(api-proxy): add section about self-signed certificates (#10963)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carsten authored and pieh committed Jan 10, 2019
1 parent 6c27086 commit 34cdece
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/docs/api-proxy.md
Expand Up @@ -55,3 +55,25 @@ module.exports = {
```

Keep in mind that middleware only has effect in development (with `gatsby develop`).

### Self-signed certificates

If you proxy to local APIs with self-signed certificates, set the option `secure` to `false`.

```javascript:title=gatsby-config.js
var proxy = require("http-proxy-middleware")
module.exports = {
developMiddleware: app => {
app.use(
"/.netlify/functions/",
proxy({
target: "http://localhost:9000",
secure: false, // Do not reject self-signed certificates.
pathRewrite: {
"/.netlify/functions/": "",
},
})
)
},
}
```

0 comments on commit 34cdece

Please sign in to comment.