Replies: 1 comment 1 reply
-
Hi @nedimaf You should create a new app.get('/', (c) => {
const req = new Request(c.req.raw)
req.headers.append('foo', 'bar')
c.req.raw = req
return c.text(c.req.header('foo'))
}) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a middleware which should attach new header to the specific incoming requests and pass them further. It seems that
c.req.header
can only get the existing header, but not modify them. Also,c.headers
can add new header, but not to the specific request. Is there any alternative for headers modification?Beta Was this translation helpful? Give feedback.
All reactions