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

feat: routes should be able to specify zone_id #774

Closed
threepointone opened this issue Apr 9, 2022 · 0 comments · Fixed by #778 or #780
Closed

feat: routes should be able to specify zone_id #774

threepointone opened this issue Apr 9, 2022 · 0 comments · Fixed by #778 or #780
Assignees

Comments

@threepointone
Copy link
Contributor

threepointone commented Apr 9, 2022

We have specific scenarios where we do actually want to specify a zone_id for a route (ssl for saas in fact requires it, as @WalshyDev pointed out). So my suggestion is to be able to specify it optionally per route. In wrangler.toml this could look like

routes = [
  "https://some-domain.com/*", 
  { pattern = "*example.com/*", zone_id = "123jh123hkj13" }, 
  "some-other-example.com/api/*"
]

We should probably do this for 2.0. I'm not sure what the api signature internally is, but I bet there's something.

@threepointone threepointone added this to the 2.0 milestone Apr 9, 2022
@threepointone threepointone self-assigned this Apr 10, 2022
threepointone added a commit that referenced this issue Apr 10, 2022
This enables optionally passing a route as `{pattern: string, zone_id: string}`. There are scenarios where we need to explicitly pass a zone_id to the api, so this is enables that.

Some nuance: our toml parser unfortunately doesn't let you have mixed types in arrays, so if you have a single route with this special shape, then you'll have to do it for all of them. We can replace it with something more recent, but I'll do that in a subsequent PR.

Further nuance: The errors from the api aren't super useful when invalid values are passed, but that's something to further work on.

Fixes #774
threepointone added a commit that referenced this issue Apr 10, 2022
This enables optionally passing a route as `{pattern: string, zone_id: string}`. There are scenarios where we need to explicitly pass a zone_id to the api, so this is enables that.

Some nuance: our toml parser unfortunately doesn't let you have mixed types in arrays, so if you have a single route with this special shape, then you'll have to do it for all of them. We can replace it with something more recent, but I'll do that in a subsequent PR.

Further nuance: The errors from the api aren't super useful when invalid values are passed, but that's something to further work on.

This also fixes some types in our cli parsing.

Fixes #774
threepointone added a commit that referenced this issue Apr 10, 2022
This enables optionally passing a route as `{pattern: string, zone_id: string}`. There are scenarios where we need to explicitly pass a zone_id to the api, so this is enables that.

Some nuance: our toml parser unfortunately doesn't let you have mixed types in arrays, so if you have a single route with this special shape, then you'll have to do it for all of them. We can replace it with something more recent, but I'll do that in a subsequent PR.

Further nuance: The errors from the api aren't super useful when invalid values are passed, but that's something to further work on.

This also fixes some types in our cli parsing.

Fixes #774
threepointone added a commit that referenced this issue Apr 10, 2022
This enables optionally passing a route as `{pattern: string, zone_id: string}`. There are scenarios where we need to explicitly pass a zone_id to the api, so this is enables that.

Some nuance: our toml parser unfortunately doesn't let you have mixed types in arrays, so if you have a single route with this special shape, then you'll have to do it for all of them. We can replace it with something more recent, but I'll do that in a subsequent PR.

Further nuance: The errors from the api aren't super useful when invalid values are passed, but that's something to further work on.

This also fixes some types in our cli parsing.

Fixes #774
threepointone added a commit that referenced this issue Apr 10, 2022
This updates some dependencies. Some highlights -

- updates to `@iarna/toml` means we can have mixed types for inline arrays, which is great for #774 / #778
- I also moved timeago.js to `devDependencies` since it already gets compiled into the bundle
- updates to `esbuild` brings along a number of smaller fixes for modern js
threepointone added a commit that referenced this issue Apr 10, 2022
This updates some dependencies. Some highlights -

- updates to `@iarna/toml` means we can have mixed types for inline arrays, which is great for #774 / #778
- I also moved timeago.js to `devDependencies` since it already gets compiled into the bundle
- updates to `esbuild` brings along a number of smaller fixes for modern js
petebacondarwin pushed a commit that referenced this issue Apr 11, 2022
This updates some dependencies. Some highlights -

- updates to `@iarna/toml` means we can have mixed types for inline arrays, which is great for #774 / #778
- I also moved timeago.js to `devDependencies` since it already gets compiled into the bundle
- updates to `esbuild` brings along a number of smaller fixes for modern js
threepointone added a commit that referenced this issue Apr 11, 2022
This enables optionally passing a route as `{pattern: string, zone_id: string}`. There are scenarios where we need to explicitly pass a zone_id to the api, so this is enables that.

Some nuance: our toml parser unfortunately doesn't let you have mixed types in arrays, so if you have a single route with this special shape, then you'll have to do it for all of them. We can replace it with something more recent, but I'll do that in a subsequent PR.

Further nuance: The errors from the api aren't super useful when invalid values are passed, but that's something to further work on.

This also fixes some types in our cli parsing.

Fixes #774
threepointone added a commit that referenced this issue Apr 11, 2022
This enables optionally passing a route as `{pattern: string, zone_id: string}`. There are scenarios where we need to explicitly pass a zone_id to the api, so this is enables that.

Some nuance: our toml parser unfortunately doesn't let you have mixed types in arrays, so if you have a single route with this special shape, then you'll have to do it for all of them. We can replace it with something more recent, but I'll do that in a subsequent PR.

Further nuance: The errors from the api aren't super useful when invalid values are passed, but that's something to further work on.

This also fixes some types in our cli parsing.

Fixes #774
threepointone added a commit that referenced this issue Apr 11, 2022
This enables optionally passing a route as `{pattern: string, zone_id: string}`. There are scenarios where we need to explicitly pass a zone_id to the api, so this is enables that.

Some nuance: our toml parser unfortunately doesn't let you have mixed types in arrays, so if you have a single route with this special shape, then you'll have to do it for all of them. We can replace it with something more recent, but I'll do that in a subsequent PR.

Further nuance: The errors from the api aren't super useful when invalid values are passed, but that's something to further work on.

This also fixes some types in our cli parsing.

Fixes #774
threepointone added a commit that referenced this issue Apr 12, 2022
This enables optionally passing a route as `{pattern: string, zone_id: string}`. There are scenarios where we need to explicitly pass a zone_id to the api, so this enables that.

Some nuance: our toml parser unfortunately doesn't let you have mixed types in arrays, so if you have a single route with this special shape, then you'll have to do it for all of them. We can replace it with something more recent, but I'll do that in a subsequent PR.

Further nuance: The errors from the api aren't super useful when invalid values are passed, but that's something to further work on.

This also fixes some types in our cli parsing.

Fixes #774
threepointone added a commit that referenced this issue Apr 12, 2022
This enables optionally passing a route as `{pattern: string, zone_id: string}`. There are scenarios where we need to explicitly pass a zone_id to the api, so this enables that.

Some nuance: our toml parser unfortunately doesn't let you have mixed types in arrays, so if you have a single route with this special shape, then you'll have to do it for all of them. We can replace it with something more recent, but I'll do that in a subsequent PR.

Further nuance: The errors from the api aren't super useful when invalid values are passed, but that's something to further work on.

This also fixes some types in our cli parsing.

Fixes #774
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
1 participant