mirror of
https://github.com/honojs/hono.git
synced 2024-11-29 17:46:30 +01:00
refactor: denoify (#1344)
This commit is contained in:
parent
58127d7fea
commit
91af6d3007
@ -107,7 +107,10 @@ class ClientRequestImpl {
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export const hc = <T extends Hono<any, any, any>>(baseUrl: string, options?: ClientRequestOptions) =>
|
||||
export const hc = <T extends Hono<any, any, any>>(
|
||||
baseUrl: string,
|
||||
options?: ClientRequestOptions
|
||||
) =>
|
||||
createProxy(async (opts) => {
|
||||
const parts = [...opts.path]
|
||||
|
||||
|
@ -2,7 +2,7 @@ import type { MiddlewareHandler } from '../../types.ts'
|
||||
import { sha1 } from '../../utils/crypto.ts'
|
||||
|
||||
type ETagOptions = {
|
||||
retainedHeaders?: string[],
|
||||
retainedHeaders?: string[]
|
||||
weak?: boolean
|
||||
}
|
||||
|
||||
@ -13,7 +13,12 @@ type ETagOptions = {
|
||||
* > Content-Location, Date, ETag, Expires, and Vary.
|
||||
*/
|
||||
const RETAINED_304_HEADERS = [
|
||||
'cache-control', 'content-location', 'date', 'etag', 'expires', 'vary'
|
||||
'cache-control',
|
||||
'content-location',
|
||||
'date',
|
||||
'etag',
|
||||
'expires',
|
||||
'vary',
|
||||
]
|
||||
|
||||
function etagMatches(etag: string, ifNoneMatch: string | null) {
|
||||
|
Loading…
Reference in New Issue
Block a user