Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Commit 39fbfaa

Browse files
author
v1rtl
committed
replace handwritten forwarded with the dep
1 parent 977bb2d commit 39fbfaa

File tree

5 files changed

+15
-69
lines changed

5 files changed

+15
-69
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</p>
55

66
[![nest badge](https://nest.land/badge.svg)](https://nest.land/package/tinyhttp) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/talentlessguy/tinyhttp-deno?style=flat-square) [![GitHub Workflow Status][gh-actions-img]][github-actions]
7-
[![Codecov](https://img.shields.io/codecov/c/gh/talentlessguy/tinyhttp-deno?style=flat-square)][codecov]
7+
[![Codecov][codecov-badge]][codecov] [![][docs-badge]][docs]
88

99
This is a [Deno](https://deno.land) port of [tinyhttp](https://github.com/talentlessguy/tinyhttp), 0-legacy, tiny &amp; fast web framework as a replacement of Express.
1010

@@ -35,3 +35,6 @@ app.listen(3000, () => console.log(`Started on :3000`))
3535
[codecov]: https://codecov.io/gh/talentlessguy/tinyhttp-deno
3636
[github-actions]: https://github.com/talentlessguy/tinyhttp-deno/actions
3737
[license]: https://github.com/talentlessguy/tinyhttp-deno/blob/master/LICENSE
38+
[codecov-badge]: https://img.shields.io/codecov/c/gh/talentlessguy/tinyhttp-deno?style=flat-square
39+
[docs-badge]: https://img.shields.io/github/v/release/talentlessguy/tinyhttp-deno?color=yellow&label=Docs&logo=deno&style=flat-square
40+
[docs]: https://doc.deno.land/https/deno.land/x/tinyhttp/mod.ts

deps.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export { Accepts } from 'https://deno.land/x/accepts@2.1.0/mod.ts'
99
export { encodeUrl } from 'https://deno.land/x/encodeurl@1.0.0/mod.ts'
1010
export { charset, contentType, lookup } from 'https://deno.land/x/media_types@v2.6.1/mod.ts'
1111
export { default as rg } from 'https://esm.sh/regexparam'
12+
export { forwarded } from 'https://deno.land/x/forwarded@v0.0.2/mod.ts'
1213
import type { ServerRequest as Req, Response as ServerResponse } from 'https://deno.land/std@0.88.0/http/server.ts'
1314

1415
interface Res extends ServerResponse {

egg.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@
44
"entry": "./app.ts",
55
"description": "0-legacy, tiny & fast web framework as a replacement of Express",
66
"homepage": "https://github.com/talentlessguy/tinyhttp-deno",
7-
"version": "0.0.15",
8-
"ignore": ["./examples/**/*.ts"],
9-
"files": ["./**/*.ts", "README.md"],
7+
"version": "0.0.16",
8+
"files": [
9+
"./*.ts",
10+
"./utils/*.ts",
11+
"./extensions/**/*.ts",
12+
"README.md"
13+
],
1014
"checkFormat": false,
1115
"checkTests": false,
1216
"checkInstallation": false,
1317
"check": true,
14-
"unlisted": false
18+
"unlisted": false,
19+
"ignore": []
1520
}

utils/forwarded.ts

Lines changed: 0 additions & 62 deletions
This file was deleted.

utils/proxyAddr.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// deno-lint-ignore-file
22

33
import { Req } from '../deps.ts'
4-
import { forwarded } from './forwarded.ts'
5-
import { ipaddr, IPv4, IPv6 } from '../deps.ts'
4+
import { ipaddr, IPv4, IPv6, forwarded } from '../deps.ts'
65

76
const DIGIT_REGEXP = /^[0-9]+$/
87
const isip = ipaddr.isValid

0 commit comments

Comments
 (0)