directus / directus/docs

Document `Directus-File-Id header` for TUS needs `CORS_EXPOSED_HEADERS` set for external domains

Open
#599 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
22
Forks
82
Avg merge
18h 49m
Merged PRs (30d)
4

Description

### Describe the Bug

With TUS file uploads, a `Directus-File-Id` HTTP header is returned instead of a proper response object. But it took me several hours to understand why i could not access it on the browser side, because I simply forget to set :
```
CORS_EXPOSED_HEADERS: "Directus-File-Id"
```

I don't know the potential security issues with enabling this by default, so I'm only asking this as a question : should the api return `Access-Control-Expose-Headers: Directus-File-Id` alongside the header ?

### To Reproduce

### Directus Version

v11.16.1

### Hosting Strategy

Self-Hosted (Docker Image)

### Database

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.