Skip to content

Commit 8275dfe

Browse files
committed
aws headers
1 parent 011cece commit 8275dfe

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

crates/fula-cli/src/routes.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,14 @@ fn create_cors_layer(origins: &[String]) -> CorsLayer {
260260
header::HeaderName::from_static("x-amz-content-sha256"),
261261
header::HeaderName::from_static("x-amz-date"),
262262
header::HeaderName::from_static("x-amz-copy-source"),
263+
// Direct pinning headers
263264
header::HeaderName::from_static("x-pinning-service"),
264265
header::HeaderName::from_static("x-pinning-token"),
266+
header::HeaderName::from_static("x-pinning-name"),
267+
// S3-compatible x-amz-meta-* pinning headers (for MinIO and other S3 clients)
268+
header::HeaderName::from_static("x-amz-meta-x-pinning-service"),
269+
header::HeaderName::from_static("x-amz-meta-x-pinning-token"),
270+
header::HeaderName::from_static("x-amz-meta-x-pinning-name"),
265271
];
266272

267273
let cors = CorsLayer::new()

docs/openAPI.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,9 @@ paths:
400400
- Pinata: https://api.pinata.cloud/psa
401401
- Web3.Storage: https://api.web3.storage
402402
- NFT.Storage: https://nft.storage/api
403+
404+
**S3 Client Compatibility**: Also accepts `x-amz-meta-x-pinning-service`
405+
for S3 client libraries like MinIO that prefix custom headers.
403406
schema:
404407
type: string
405408
format: uri
@@ -409,6 +412,8 @@ paths:
409412
description: |
410413
User's IPFS Pinning Service access token (Bearer token).
411414
This is the user's own credential - NOT stored by the gateway.
415+
416+
**S3 Client Compatibility**: Also accepts `x-amz-meta-x-pinning-token`.
412417
schema:
413418
type: string
414419
- name: x-pinning-name

0 commit comments

Comments
 (0)