Skip to content

Commit 09b61c2

Browse files
committed
Improved http endpoint docs
1 parent 2fcd519 commit 09b61c2

File tree

1 file changed

+9
-9
lines changed
  • src/content/docs/pipelines/build-with-pipelines

1 file changed

+9
-9
lines changed

src/content/docs/pipelines/build-with-pipelines/http.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ head:
1010

1111
import { Render, PackageManagers } from "~/components";
1212

13-
Pipelines support data ingestion over HTTP. When you create a new Pipeline, you'll receive a globally scalable ingestion endpoint. To ingest data, make HTTP POST requests to the endpoint.
13+
Pipelines support data ingestion over HTTP. When you create a new pipeline, you'll receive a globally scalable ingestion endpoint. To ingest data, make HTTP POST requests to the endpoint.
1414

1515

1616
```sh
@@ -24,16 +24,16 @@ You can now send data to your pipeline with:
2424
```
2525

2626
## Turning HTTP ingestion off
27-
By default, ingestion via HTTP is turned on for all Pipelines. You can turn it off by setting `--http false` when creating or updating a Pipeline.
27+
By default, ingestion via HTTP is turned on. You can turn it off by setting `--enable-http false` when creating or updating a pipeline.
2828

2929
```sh
3030
$ npx wrangler pipelines create [PIPELINE-NAME] --r2-bucket [R2-BUCKET-NAME] --enable-http false
3131
```
3232

33-
Ingestion URLs are tied to your Pipeline ID. Turning HTTP off, and then turning it back on, will not change the URL.
33+
Ingestion URLs are tied to your pipeline ID. Turning HTTP off, and then turning it back on, will not change the URL.
3434

3535
## Authentication
36-
You can secure your HTTP ingestion endpoint using Cloudflare API tokens. By default, authentication is turned off. To enable authentication, use `--authentication true` while creating or updating a Pipeline.
36+
You can secure your HTTP ingestion endpoint using Cloudflare API tokens. By default, authentication is turned off. To enable authentication, use `--require-http-auth true` while creating or updating a pipeline.
3737

3838
```sh
3939
$ npx wrangler pipelines create [PIPELINE-NAME] --r2-bucket [R2-BUCKET-NAME] --require-http-auth true
@@ -61,19 +61,19 @@ curl https://<PIPELINE-ID>.pipelines.cloudflare.com
6161
```
6262

6363
## Specifying CORS Settings
64-
If you want to use your Pipeline to ingest client side data, such as website clicks, you'll need to configure your [Cross-Origin Resource Sharing (CORS) settings](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS).
64+
If you want to use your pipeline to ingest client side data, such as website clicks, you'll need to configure your [Cross-Origin Resource Sharing (CORS) settings](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS).
6565

66-
Without setting your CORS settings, browsers will restrict requests made to your Pipeline endpoint. For example, if your website domain is `https://my-website.com`, and you want to post client side data to your pipeline at `https://<PIPELINE-ID>.pipelines.cloudflare.com`, without CORS settings, the request will fail.
66+
Without setting your CORS settings, browsers will restrict requests made to your pipeline endpoint. For example, if your website domain is `https://my-website.com`, and you want to post client side data to your pipeline at `https://<PIPELINE-ID>.pipelines.cloudflare.com`, without CORS settings, the request will fail.
6767

68-
To fix this, you need to configure your Pipeline to accept requests from `https://my-website.com`. You can do so while creating or updating a pipeline, using the flag `--cors-origins`. You can specify multiple domains separated by a space.
68+
To fix this, you need to configure your pipeline to accept requests from `https://my-website.com`. You can do so while creating or updating a pipeline, using the flag `--cors-origins`. You can specify multiple domains separated by a space.
6969

7070
```sh
7171
$ npx wrangler pipelines update [PIPELINE-NAME] --cors-origins https://mydomain.com http://localhost:8787
7272
```
7373

74-
You can specify that all cross origin requests are accepted. We recommend only using this option for testing Pipelines, and not for production use cases.
74+
You can specify that all cross origin requests are accepted. We recommend only using this option in development, and not for production use cases.
7575
```sh
7676
$ npx wrangler pipelines update [PIPELINE-NAME] --cors-origins "*"
7777
```
7878

79-
After your the `--cors-origins` have been set on your Pipeline, your Pipeline will respond to preflight requests and POST requests with the appropriate `Access-Control-Allow-Origin` headers set.
79+
After your the `--cors-origins` have been set on your pipeline, your pipeline will respond to preflight requests and POST requests with the appropriate `Access-Control-Allow-Origin` headers set.

0 commit comments

Comments
 (0)