Skip to content

Conversation

@gary149
Copy link
Collaborator

@gary149 gary149 commented Nov 24, 2025

The API now returns the content-type from the fetched response instead of always using text/plain. This allows clients to receive the correct content type for the requested resource.

The API now returns the content-type from the fetched response instead of always using text/plain. This allows clients to receive the correct content type for the requested resource.
@gary149 gary149 requested a review from coyotte508 November 24, 2025 13:47
Adds a utility for safer MIME type inference and selection, using file extensions and forwarded headers. Updates file fetch logic in UrlFetchModal and loadAttachmentsFromUrls to use the new helper, improving filename extraction and MIME type accuracy. The API endpoint now always returns 'text/plain' for safety, exposing the original content type in a custom header.
gary149 and others added 2 commits November 24, 2025 15:55
Co-authored-by: Eliott C. <coyotte508@gmail.com>
Co-authored-by: Eliott C. <coyotte508@gmail.com>
@gary149 gary149 changed the title Preserve original content-type in fetch-url API Forward original MIME Nov 24, 2025
@gary149 gary149 requested a review from coyotte508 November 24, 2025 15:06
Copy link
Member

@coyotte508 coyotte508 left a comment

Choose a reason for hiding this comment

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

one day those lint errors should be fixed :)

@gary149 gary149 merged commit 40efd2f into main Nov 24, 2025
4 of 6 checks passed
@gary149 gary149 deleted the url-fetch-strong-csp-header-and-plain-text-3 branch November 24, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants