diff --git a/packages/binding-http/src/http-server.ts b/packages/binding-http/src/http-server.ts index 60aed833b..e697dcdb6 100644 --- a/packages/binding-http/src/http-server.ts +++ b/packages/binding-http/src/http-server.ts @@ -308,7 +308,7 @@ export default class HttpServer implements ProtocolServer { private addUrlRewriteEndpoints(form: TD.Form, forms: Array): void { if (this.urlRewrite) { for (const [inUri, toUri] of Object.entries(this.urlRewrite)) { - if (toUri != null && form.href.endsWith(toUri)) { + if (form.href.endsWith(toUri)) { const form2: TD.Form = JSON.parse(JSON.stringify(form)); // deep copy form2.href = form2.href.substring(0, form.href.lastIndexOf(toUri)) + inUri; forms.push(form2);