Skip to content

Commit

Permalink
chore: migrate to commons 0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsonk committed Jun 8, 2024
1 parent 4e4f5cd commit cbf6ac1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 322 deletions.
17 changes: 9 additions & 8 deletions deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,37 +43,38 @@ export {
SecureCookieMap,
type SecureCookieMapGetOptions,
type SecureCookieMapSetDeleteOptions,
} from "jsr:@oak/commons@0.10/cookie_map";
export { parse as parseFormData } from "jsr:@oak/commons@0.10/form_data";
} from "jsr:@oak/commons@0.11/cookie_map";
export { parse as parseFormData } from "jsr:@oak/commons@0.11/form_data";
export { parse as parseForwarded } from "jsr:@oak/commons@0.11/forwarded";
export {
createHttpError,
errors,
HttpError,
type HttpErrorOptions,
isHttpError,
} from "jsr:@oak/commons@0.10/http_errors";
export { matches } from "jsr:@oak/commons@0.10/media_types";
export { type HttpMethod as HTTPMethods } from "jsr:@oak/commons@0.10/method";
} from "jsr:@oak/commons@0.11/http_errors";
export { matches } from "jsr:@oak/commons@0.11/media_types";
export { type HttpMethod as HTTPMethods } from "jsr:@oak/commons@0.11/method";
export {
type ByteRange,
range,
responseRange,
} from "jsr:@oak/commons@0.10/range";
} from "jsr:@oak/commons@0.11/range";
export {
ServerSentEvent,
type ServerSentEventInit,
ServerSentEventStreamTarget,
type ServerSentEventTarget,
type ServerSentEventTargetOptions,
} from "jsr:@oak/commons@0.10/server_sent_event";
} from "jsr:@oak/commons@0.11/server_sent_event";
export {
type ErrorStatus,
isErrorStatus,
isRedirectStatus,
type RedirectStatus,
Status,
STATUS_TEXT,
} from "jsr:@oak/commons@0.10/status";
} from "jsr:@oak/commons@0.11/status";

export {
compile,
Expand Down
95 changes: 0 additions & 95 deletions forwarded.test.ts

This file was deleted.

217 changes: 0 additions & 217 deletions forwarded.ts

This file was deleted.

4 changes: 2 additions & 2 deletions middleware/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import type { State } from "../application.ts";
import type { Context } from "../context.ts";
import { parse } from "../forwarded.ts";
import { parseForwarded } from "../deps.ts";
import type { Middleware } from "../middleware.ts";
import type {
RouteParams,
Expand Down Expand Up @@ -168,7 +168,7 @@ async function createRequest<
? `"${ctx.request.ip}"`
: ctx.request.ip;
const host = headers.get("host");
if (maybeForwarded && parse(maybeForwarded)) {
if (maybeForwarded && parseForwarded(maybeForwarded)) {
let value = `for=${ip}`;
if (host) {
value += `;host=${host}`;
Expand Down

0 comments on commit cbf6ac1

Please sign in to comment.