Updated a few more things

This commit is contained in:
QuiteAFancyEmerald 2022-02-08 00:43:17 -08:00
parent c827e9f7e1
commit 73cdcb3186
47 changed files with 35805 additions and 1102 deletions

View file

@ -4,9 +4,10 @@
// -------------------------------------------------------------
const URLWrapper = require('./url');
const CookieRewriter = require('./cookie');
const CSSRewriter = require('./css');
const HTMLRewriter = require('./html');
const JSRewriter = require('./js');
const CSSRewriter = require('./css/');
const HTMLRewriter = require('./html/');
const JSRewriter = require('./js/');
const codec = require('./codec');
const defaultConfig = {
prefix: '/service/',
codec: 'plain',
@ -19,9 +20,8 @@ class Rewrite {
constructor(config = defaultConfig) {
this.config = Object.assign(defaultConfig, config);
this.prefix = this.config.prefix;
this.forceHttps = this.config.forceHttps;
this.url = new URLWrapper(this.config || {});
this.codec = this.url.codec;
this.url = new URLWrapper(this.config || {}, this);
this.codec = codec;
this.cookies = new CookieRewriter(this);
this.css = new CSSRewriter(this);
this.js = new JSRewriter(this);