Skip to content

Commit

Permalink
Add browser flag properly
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Dec 15, 2024
1 parent 2b035df commit ea8698b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/executor/nginx.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,14 @@ class NginxExecutor {
idx = node.location.length - 1;
}
node.location[idx]._add('if', `($http_referer !~ "^https?://${info.dom}")`);
node.location[idx].if[0]._add('rewrite', '^ /deceptive.html last');
node.location[idx]._add('if', `($http_user_agent ~ "^Mozilla")`);
node.location[idx]._add('if', `$reject = "12"`);
node.location[idx].if[0]._add('set', '$reject "${reject}1"');
node.location[idx].if[1]._add('set', '$reject "${reject}2"');
node.location[idx].if[2]._add('rewrite', '^ /deceptive.html last');
node._add('location', '= /deceptive.html', []);
const iloc = node.location[node.location.length - 1]
iloc._add('if', `($http_user_agent ~ "^Mozilla")`);
iloc.if[0]._add('root', '/usr/local/share/www');
iloc._add('root', '/usr/local/share/www');
iloc._add('internal');
}
}
Expand Down

0 comments on commit ea8698b

Please sign in to comment.