Skip to content

Conversation

eduardoboucas
Copy link
Member

Summary

Counterpart to #6542, adding support for the header property to edge functions declared in netlify.toml.

@eduardoboucas eduardoboucas requested a review from a team as a code owner July 14, 2025 11:09
Copy link
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

Copy link
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

function = "function2"
path = "/function2"

[edge_functions.header]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toml interprets the values in an array as applied to the previous item? In other words, these header declarations now apply to function2, but if we do

[[edge_functions]]
function = "function2"
path = "/function2"

[[edge_functions]]
function = "function3"
path = "/function3"

[edge_functions.header]
x-bar = "some-value"
x-foo = true

this would apply the headers to function3?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. 😑

You can see that for yourself in https://pseitz.github.io/toml-to-json-online-converter/.

@eduardoboucas eduardoboucas merged commit 55857bb into main Jul 14, 2025
57 of 61 checks passed
@eduardoboucas eduardoboucas deleted the feat/ef-header-toml branch July 14, 2025 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants