Skip to content

Commit c3e1171

Browse files
committed
chore: remove redundant validation from request context
1 parent 82e13fd commit c3e1171

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/handlers/services/providerContext.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import Providers from '../../providers';
99
import { RequestContext } from './requestContext';
1010
import { ANTHROPIC, AZURE_OPEN_AI } from '../../globals';
1111
import { GatewayError } from '../../errors/GatewayError';
12-
import { isValidCustomHost } from '../../middlewares/requestValidator';
1312

1413
export class ProviderContext {
1514
constructor(private provider: string) {
@@ -95,10 +94,6 @@ export class ProviderContext {
9594
}
9695

9796
async getFullURL(context: RequestContext): Promise<string> {
98-
const customHost = context.customHost;
99-
if (customHost && !isValidCustomHost(customHost, context.honoContext)) {
100-
throw new GatewayError('Invalid custom host');
101-
}
10297
const baseURL = context.customHost || (await this.getBaseURL(context));
10398
let url: string;
10499
if (context.endpoint === 'proxy') {

0 commit comments

Comments
 (0)