Skip to content

Commit 1cab3bc

Browse files
authored
Increase form data limit to 128KiB (#2)
1 parent 346d099 commit 1cab3bc

File tree

8 files changed

+94
-74
lines changed

8 files changed

+94
-74
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v2
1616

17-
- name: Choose nightly
18-
run: rustup update && cargo update && rustup override set nightly
17+
- name: Set up rust nightly
18+
run: |
19+
rustup update
20+
cargo update
21+
rustup override set nightly
1922
20-
- name: Build
23+
- name: Compile
2124
run: cargo build --verbose

.gitignore

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# IDE
22
/.idea
33

4-
# Generated by Cargo
5-
# will have compiled files and executables
6-
/target/
4+
# Compiled
5+
/target
6+
/md-to-pdf
77

8-
# These are backup files generated by rustfmt
8+
# Generated by rustfmt
99
**/*.rs.bk
1010

11+
# Individual
12+
docker-compose.override.yml
13+
14+
# Generated
1115
*.pdf
1216
.bash_history
13-
md-to-pdf

Cargo.lock

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

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ USER rocket
2626
WORKDIR /home/rocket
2727

2828
COPY static /home/rocket/static
29+
COPY Rocket.toml /home/rocket/Rocket.toml

Makefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ dcrust=$$( [ -f /.dockerenv ] && echo "" || echo "docker-compose exec rust")
22
dcpandoc=$$( [ -f /.dockerenv ] && echo "" || echo "docker-compose exec pandoc")
33

44
.PHONY: it
5-
it: fmt build test ## Peform common targets
5+
it: fmt target/debug test ## Perform common targets
66

77
.PHONY: help
88
help: ## Displays this list of targets with descriptions
99
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}'
1010

1111
.PHONY: setup
12-
setup: dc-build cargo-deps build ## Setup the local environment
12+
setup: dc-build cargo-deps ## Set up the local environment
1313

1414
.PHONY: dc-build
1515
dc-build: ## Build the local dev image
@@ -23,8 +23,7 @@ up: ## Bring up the containers
2323
cargo-deps: up ## Reinstall cargo dependencies
2424
${dcrust} cargo update
2525

26-
.PHONY: build
27-
build: up ## Reinstall cargo dependencies
26+
target/debug: up src ## Compile
2827
${dcrust} cargo build
2928

3029
.PHONY: rust
@@ -36,11 +35,11 @@ pandoc: up ## Enter an interactive shell into the pandoc container
3635
${dcpandoc} bash
3736

3837
.PHONY: serve
39-
serve: up ## Serve the compiled application
38+
serve: up target/debug ## Serve the compiled application
4039
${dcpandoc} target/debug/md-to-pdf
4140

4241
.PHONY: fmt
43-
fmt: ## Format the rust code
42+
fmt: up ## Format the rust code
4443
${dcrust} cargo fmt
4544

4645
.PHONY: test

Rocket.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
[development]
22
address = "0.0.0.0"
3+
4+
[global.limits]
5+
forms = 131072

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ services:
55
- ./:/workdir
66
working_dir: /workdir
77
tty: true
8+
89
pandoc:
910
build:
1011
context: .

0 commit comments

Comments
 (0)