Skip to content

Commit

Permalink
fix(snippet): revert changes to snippet injection position - fixes #1062
Browse files Browse the repository at this point in the history
  • Loading branch information
shakyShane committed Apr 13, 2016
1 parent 5405888 commit c048a1c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/default-config.js
Expand Up @@ -195,7 +195,7 @@ module.exports = {
whitelist: [],
blacklist: [],
rule: {
match: /$/,
match: /<body[^>]*>/i,
fn: function (snippet, match) {
return match + snippet;
}
Expand Down
2 changes: 1 addition & 1 deletion test/specs/e2e/proxy/e2e.proxy.proxy.options.js
Expand Up @@ -41,7 +41,7 @@ describe("E2E proxy test with `proxyOptions`", function () {

it("sets options for node-http-proxy", function (done) {

var expected = app.html + bs.options.get("snippet");
var expected = app.html.replace("BS", bs.options.get("snippet") + "BS");
var headers;

app.app.stack.unshift({
Expand Down
2 changes: 1 addition & 1 deletion test/specs/e2e/proxy/e2e.proxy.req.headers.js
Expand Up @@ -46,7 +46,7 @@ describe("E2E proxy test with custom req headers", function () {

it("sets custom headers on proxy reqs", function (done) {

var expected = app.html + bs.options.get("snippet");
var expected = app.html.replace("BS", bs.options.get("snippet") + "BS");
var headers;

app.app.stack.unshift({
Expand Down
2 changes: 1 addition & 1 deletion test/specs/e2e/proxy/e2e.proxy.req.headers.obj.js
Expand Up @@ -44,7 +44,7 @@ describe("E2E proxy test with custom req headers as object", function () {

it("sets custom headers on proxy reqs from an object", function (done) {

var expected = app.html + bs.options.get("snippet");
var expected = app.html.replace("BS", bs.options.get("snippet") + "BS");
var headers;

app.app.stack.unshift({
Expand Down
2 changes: 1 addition & 1 deletion test/specs/e2e/proxy/e2e.proxy.secure.js
Expand Up @@ -45,7 +45,7 @@ describe("E2E TLS proxy test", function () {

assert.isString(bs.options.get("snippet"));

var expected = app.html + bs.options.get("snippet");
var expected = app.html.replace("BS", bs.options.get("snippet") + "BS");

request(bs.options.getIn(["urls", "local"]))
.get("/index.html")
Expand Down

1 comment on commit c048a1c

@divmgl
Copy link

@divmgl divmgl commented on c048a1c Apr 13, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very quick response on this, will test tomorrow. Thanks.

Please sign in to comment.