mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 22:08:37 -04:00
Fix raw endpoint PDF file headers (#19825)
This commit is contained in:
parent
410df1fbd4
commit
65e0688a5c
2 changed files with 12 additions and 4 deletions
|
@ -17,8 +17,12 @@ import (
|
|||
// Use at most this many bytes to determine Content Type.
|
||||
const sniffLen = 1024
|
||||
|
||||
// SvgMimeType MIME type of SVG images.
|
||||
const SvgMimeType = "image/svg+xml"
|
||||
const (
|
||||
// SvgMimeType MIME type of SVG images.
|
||||
SvgMimeType = "image/svg+xml"
|
||||
// ApplicationOctetStream MIME type of binary files.
|
||||
ApplicationOctetStream = "application/octet-stream"
|
||||
)
|
||||
|
||||
var (
|
||||
svgTagRegex = regexp.MustCompile(`(?si)\A\s*(?:(<!--.*?-->|<!DOCTYPE\s+svg([\s:]+.*?>|>))\s*)*<svg[\s>\/]`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue