Skip to content

Commit e921051

Browse files
committed
Corrections and additions after PRs merges.
1 parent 33c61eb commit e921051

File tree

10 files changed

+20
-20
lines changed

10 files changed

+20
-20
lines changed

.env.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ CUSTOM_LOGIC_ALLOW_FILE_RESOURCES = false
2727
SERVER_ENABLE = false
2828
SERVER_HOST = 0.0.0.0
2929
SERVER_PORT = 7801
30+
SERVER_MAX_UPLOAD_SIZE = 3
3031
SERVER_BENCHMARKING = false
3132

3233
# SERVER PROXY CONFIG

CHANGELOG.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
_Breaking Changes:_
44

5-
- Removed `xlink:href` from incoming SVGs in preperation for an upcoming puppeteer update that will remove this option.
5+
- Removed `xlink:href` from incoming SVGs in preperation for an upcoming Puppeteer update that will remove this option.
66
- Changed the upload file size limit to 3MB, and exposed settings for configuring it (`SERVER_MAX_UPLOAD_SIZE`/`--maxUploadSize`/`maxUploadSize`). The rational behind this change is that in testing that seems like the most balanced limit along with other default values for pool sizing, timeouts and such to avoid attempting to process requests that would likely end up timing out due to its size.
77

88
_Fixes:_
99

10-
- Fixed an issue where clip size for PDFs would on rare occation be invalid, causing the export to fail
11-
- Fixed an issue where the chart constructor was sometimes incorrectly set, causing the export to fail
12-
- Added referrers to CDN cache fetches on first startup/install.
13-
- Fixed an issue that would sometimes cause cause a crash due to fail due to `Accept-Ranges` headers
10+
- Fixed an issue where clip size for PDFs would on rare occation be invalid, causing the export to fail.
11+
- Fixed an issue where the chart constructor was sometimes incorrectly set, causing the export to fail.
12+
- Fixed an issue that would sometimes cause a crash due to fail due to `Accept-Ranges` headers.
13+
- Fixed the warning message when the the default `resources.json` file is not found.
14+
- Fixed the problem with the lack of the `instr` value, when the `options` is set instead.
15+
- Added referrers to CDN cache fetches on first startup/install.
1416
- Wrapped the `clearPageResources` function in a try-catch to handle potential page resources errors.
1517
- Secured against errors caused by `dev-tools` protocol data size limitations.
1618
- Corrected the `Node.js Module` example in the README.
17-
- Fixed the warning message when the the default `resources.json` file is not found.
18-
- Fixed the problem with the lack of the `instr` value, when the `options` is set instead
1919

2020
_New Features:_
2121

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ These variables are set in your environment and take precedence over options fro
324324
- `SERVER_HOST`: The hostname of the server. Additionally, it starts a server listening on the provided hostname (defaults to `0.0.0.0`).
325325
- `SERVER_PORT`: The port to be used for the server when enabled (defaults to `7801`).
326326
- `SERVER_BENCHMARKING`: Indicates whether to display a message with the duration, in milliseconds, of specific actions that occur on the server while serving a request (defaults to `false`).
327-
- `SERVER_MAX_UPLOAD_SIZE`: The maximum size, in MB, of uploaded files (defaults to `3`).
327+
- `SERVER_MAX_UPLOAD_SIZE`: The maximum size, in MB, of files uploaded through the server (defaults to `3`).
328328

329329
### Server Proxy Config
330330

@@ -428,8 +428,8 @@ _Available options:_
428428
- `--serverBenchmarking`: Indicates whether to display the duration, in milliseconds, of specific actions that occur on the server while serving a request (defaults to `false`).
429429
- `--proxyHost`: The host of the proxy server to use, if it exists (defaults to `false`).
430430
- `--proxyPort`: The port of the proxy server to use, if it exists (defaults to `false`).
431-
- `--proxyUsername`: If you want your proxy to be authenticated, pass the username with password (defaults to `false`).
432-
- `--proxyPassword`: If you want your proxy to be authenticated, pass the username with password (defaults to `false`).
431+
- `--proxyUsername`: If used proxy with authentication, need to pass username and password (defaults to `false`).
432+
- `--proxyPassword`: If used proxy with authentication, need to pass username and password (defaults to `false`).
433433
- `--proxyTimeout`: The timeout for the proxy server to use, if it exists (defaults to `5000`).
434434
- `--enableRateLimiting`: Enables rate limiting for the server (defaults to `false`).
435435
- `--maxRequests`: The maximum number of requests allowed in one minute (defaults to `10`).

dist/index.cjs

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

dist/index.esm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.esm.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/envs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ export const Config = z.object({
164164
SERVER_ENABLE: v.boolean(),
165165
SERVER_HOST: v.string(),
166166
SERVER_PORT: v.positiveNum(),
167+
SERVER_MAX_UPLOAD_SIZE: v.positiveNum(),
167168
SERVER_BENCHMARKING: v.boolean(),
168169

169170
// server proxy

lib/sanitize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function sanitize(input) {
3333
const purify = DOMPurify(window);
3434
return purify.sanitize(input, {
3535
ADD_TAGS: ['foreignObject'],
36-
// Dissalow all xlinks in incoming SVG
36+
// Disallow all xlinks in incoming SVG
3737
FORBID_ATTR: ['xlink:href']
3838
});
3939
}

lib/schemas/config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,8 @@ export const defaultConfig = {
357357
maxUploadSize: {
358358
value: 3,
359359
type: 'number',
360-
cliName: 'maxUploadSize',
361360
envLink: 'SERVER_MAX_UPLOAD_SIZE',
362-
description:
363-
'The maximum upload size, in megabytes, for the server'
361+
description: 'The maximum upload size, in MB, for the server.'
364362
},
365363
enable: {
366364
value: false,

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)