@webqit/webflo 0.11.37 → 0.11.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "vanila-javascript"
13
13
  ],
14
14
  "homepage": "https://webqit.io/tooling/webflo",
15
- "version": "0.11.37",
15
+ "version": "0.11.39",
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
@@ -43,7 +43,7 @@
43
43
  "esbuild": "^0.14.38",
44
44
  "form-data-encoder": "^1.6.0",
45
45
  "formdata-node": "^4.3.0",
46
- "formidable": "^2.0.0-dev.20200131.2",
46
+ "formidable": "^2.0.1",
47
47
  "mime-types": "^2.1.33",
48
48
  "node-fetch": "^2.6.1",
49
49
  "simple-git": "^2.20.1",
@@ -21,14 +21,14 @@ export default class Server extends Dotfile {
21
21
  return this.merge({
22
22
  port: process.env.port || 3000,
23
23
  domains: [],
24
- force_www: '',
25
24
  https: {
26
25
  port: 0,
27
- keyfile: '',
28
- certfile: '',
29
26
  domains: [],
27
+ keyfile: '/etc/letsencrypt/live/[domain]/privkey.pem',
28
+ certfile: '/etc/letsencrypt/live/[domain]/fullchain.pem',
30
29
  force: false,
31
30
  },
31
+ force_www: '',
32
32
  oohtml_support: 'full',
33
33
  }, config, 'patch');
34
34
  }
@@ -220,7 +220,12 @@ export default class Runtime extends _Runtime {
220
220
  * @return Array
221
221
  */
222
222
  async parseNodeRequest(proto, request) {
223
- const fullUrl = proto + '://' + request.headers.host + request.url;
223
+ let url = request.url;
224
+ // Detected when using manual proxy setting in a browser
225
+ if (url.startsWith(`http://${ request.headers.host }`) || url.startsWith(`https://${ request.headers.host }`)) {
226
+ url = url.split(request.headers.host)[1];
227
+ }
228
+ const fullUrl = proto + '://' + request.headers.host + url;
224
229
  const requestInit = { method: request.method, headers: request.headers };
225
230
  if (request.method !== 'GET' && request.method !== 'HEAD') {
226
231
  requestInit.body = await new Promise((resolve, reject) => {
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * The xfetch Mixin
4
4
  */
5
- const xfetch = (whatwagFetch, xRequest) => {
5
+ const xfetch = (whatwagFetch, xRequest = null) => {
6
6
  return (url, init = {}) => {
7
- if (init.body && (typeof init.body === 'object')) {
7
+ if (init.body && (typeof init.body === 'object') && xRequest) {
8
8
  return whatwagFetch(new xRequest(url, init));
9
9
  }
10
10
  return whatwagFetch(url, init);