Don't set ignore_comments for compatibility with nlohmann::json versions < 3.9
This commit is contained in:
parent
e5bba4ea36
commit
a1171e9431
|
@ -12,7 +12,10 @@
|
|||
|
||||
Copy `example_config.json` to a file with any name you like
|
||||
(e.g. `config.json`), then open the copied file and edit the parameters to your
|
||||
liking (they should be self-explanatory, especially with comments).
|
||||
liking. Here's a list of what they are:
|
||||
- `bind_host` (string): What address to bind to
|
||||
- `bind_port` (zero or positive integer): What port to bind to
|
||||
- `image_proxy_url` (string): URL to proxy images to (see https://pixiv.cat/reverseproxy.html), a trailing slash is not needed
|
||||
|
||||
Pixwhile is intended to be run behind a reverse proxy (e.g. Nginx), so you
|
||||
should set your reverse proxy to proxy requests to
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
Config load_config(const char* path) {
|
||||
File config_file(path, "r");
|
||||
return nlohmann::json::parse(config_file.get(), nullptr, true, true);
|
||||
return nlohmann::json::parse(config_file.get());
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& j, Config& config) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"bind_host": "127.0.0.1", // string: What address to bind to
|
||||
"bind_port": 8080, // integer: What port to bind to
|
||||
"image_proxy_url": "https://i.pixiv.cat" // string: URL to proxy images to (see https://pixiv.cat/reverseproxy.html), a trailing slash is not needed
|
||||
"bind_host": "127.0.0.1",
|
||||
"bind_port": 8080,
|
||||
"image_proxy_url": "https://i.pixiv.cat"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue