@thrnd/http-proxy
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -16,3 +16,3 @@ "use strict"; | ||
} | ||
const tagToInsert = `<base href="${context.match.match?.path}">`; | ||
const tagToInsert = `<base href="${serviceBasePath.replace(/\/?$/, '/')}">`; | ||
const contents = serviceResponseBody.toString(contentType.parameters['charset']); | ||
@@ -19,0 +19,0 @@ const headTagMatch = contents.match(/<head([^>]*)>/i); |
@@ -13,3 +13,3 @@ import { AbstractProcessor } from "./abstract.processor"; | ||
} | ||
const tagToInsert = `<base href="${context.match.match?.path}">`; | ||
const tagToInsert = `<base href="${serviceBasePath.replace(/\/?$/, '/')}">`; | ||
const contents = serviceResponseBody.toString(contentType.parameters['charset']); | ||
@@ -16,0 +16,0 @@ const headTagMatch = contents.match(/<head([^>]*)>/i); |
{ | ||
"name": "@thrnd/http-proxy", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"main": "./dist/cjs/proxy-framework.app.js", | ||
@@ -5,0 +5,0 @@ "module": "./dist/esm/proxy-framework.app.js", |
# @thrnd/http-proxy | ||
`@thrnd/http-proxy` will help you when you need to route external services under different paths under single domain. | ||
`@thrnd/http-proxy` is a proxy service intended for supporting local development. It allows you to quickly | ||
define rules that you need to properly run and develop your local services and properly accessing the remote services. | ||
Example use cases: | ||
- rewrite cookies set by target service to proxy host (you can disable this feature by setting 'rewriteCookies' to `false` in rewrite record in config file) | ||
- rewrite location headers set by target service to proxy host (you can disable this feature by setting 'rewriteRedirect' to `false` in rewrite record in config file) | ||
- rewrite urls in html body (you can enable this feature by setting `rewriteBody` to `true` in rewrite record in config file) | ||
- rewrite cookies set by the origin service; | ||
- rewrite location headers set by the origin service; | ||
- rewrite urls in responses from the origin service. | ||
@@ -11,0 +12,0 @@ ## Usage |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
389
308005