# Duplicate headers when curl'ing REST API

**URL:** <https://forum.buildkite.community/t/duplicate-headers-when-curling-rest-api/3762>\
**Category:** General\
**Created:** [June 26, 2024, 8:32pm UTC](https://forum.buildkite.community/t/duplicate-headers-when-curling-rest-api/3762 "2024-06-26T20:32:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![docwhat](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/docwhat/32/1462_2.png) [@docwhat](https://forum.buildkite.community/u/docwhat)\
**Post date:** [June 26, 2024, 8:32pm UTC](https://forum.buildkite.community/t/duplicate-headers-when-curling-rest-api/3762/1 "2024-06-26T20:32:19Z")

</div>

They say a picture is worth a thousand words…

```sh
❯ curl -sS -I --oauth2-bearer "$BUILDKITE_API_TOKEN" --url https://api.buildkite.com/v2/organizations/myorg/pipelines/mypipeline/builds | sort| uniq -dc
   2 strict-transport-security: max-age=31536000; includeSubDomains; preload
   2 x-content-type-options: nosniff
   2 x-frame-options: SAMEORIGIN

```

This shows that the headers `strict-transport-security`, `x-content-type-options`, and `x-frame-options` are being sent to the client twice.

Since they are identical, there is no harm. But it is a waste and looks unprofessional.

Ciao!

---

<div class="post-metadata">

**Author:** ![suma](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/suma/32/1306_2.png) [@suma](https://forum.buildkite.community/u/suma)\
**Post date:** [June 26, 2024, 9:34pm UTC](https://forum.buildkite.community/t/duplicate-headers-when-curling-rest-api/3762/2 "2024-06-26T21:34:48Z")

</div>

Hey @docwhat ,

First of all welcome to our Buildkite community.

Thank you for sharing this feedback around headers being sent twice to the client in the API response. We will look into this and get this addressed.

Thanks,  
Suma

---

<div class="post-metadata">

**Author:** ![Jordan](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/jordan/32/1433_2.png) [@Jordan](https://forum.buildkite.community/u/Jordan)\
**Post date:** [June 26, 2024, 11:19pm UTC](https://forum.buildkite.community/t/duplicate-headers-when-curling-rest-api/3762/3 "2024-06-26T23:19:48Z")

</div>

Hey @docwhat,

I’m Jordan, an engineer on the Pipelines team. Thanks for raising this with us! We’ll have this looked at and remedied.

Cheers!
