Skip to content

Commit

Permalink
feat: add originUrl variable into request
Browse files Browse the repository at this point in the history
  • Loading branch information
lau1944 committed Sep 17, 2023
1 parent 7dcbe08 commit d19419f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bun-rest",
"version": "1.3.3",
"name": "bunrest",
"version": "1.3.4",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"description": "An express-like API for bun http server",
Expand Down
1 change: 1 addition & 0 deletions src/server/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export interface BunRequest {
query?: { [key: string]: any };
body?: { [key: string]: any } | string | undefined;
blob?: any;
originalUrl: string;
}

export interface SSLOptions {
Expand Down
1 change: 1 addition & 0 deletions src/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ class BunServer implements RequestMethod {
query: {},
params: {},
headers: {},
originalUrl: req.url,
};

// append query params
Expand Down

0 comments on commit d19419f

Please sign in to comment.