issues
search
crestfall-sh
/
modules
Crestfall Modules
MIT License
5
stars
0
forks
source link
uwu: flexible and accurate headers
#7
Closed
joshxyzhimself
closed
2 years ago
joshxyzhimself
commented
2 years ago
Problem
our headers has custom format like x_forwarded_for
we cannot parse range headers yet
we cannot use custom headers like headers['X-UPLOAD-ID'] or headers['X-IDEMPOTENCY-KEY']
Fix
Use standard Headers object
https://developer.mozilla.org/en-US/docs/Web/API/Headers
Use a function that lets the user extract custom headers from requests
joshxyzhimself
commented
2 years ago
fix
export constant default_headers
used Map<string, string> instead of Headers for consistency in both request and response object; header keys are now case sensitive
default_headers is global, cannot set custom headers per middleware yet due to chained middleware support
Problem
Fix