feat: set IPv4 first as an option

This commit is contained in:
Gauthier
2024-07-11 16:33:33 +02:00
parent eddbf2d0ec
commit e9d6046997
4 changed files with 11 additions and 4 deletions

View File

@@ -8,3 +8,4 @@ pnpm-lock.yaml
# assets
src/assets/
public/
docs/

View File

@@ -79,7 +79,7 @@ pnpm start
```
</TabItem>
</Tabs>
:::info
You can now access Jellyseerr by visiting `http://localhost:5055` in your web browser.
:::
@@ -99,6 +99,9 @@ PORT=5055
## Uncomment if your media server is emby instead of jellyfin.
# JELLYFIN_TYPE=emby
## Uncomment if you want to force Node.js to resolve IPv4 before IPv6 (advanced users only)
# FORCE_IPV4_FIRST=true
```
2. Then run the following commands:
```bash
@@ -312,7 +315,7 @@ node dist/index.js
Now, Jellyseerr will start when the computer boots up in the background.
</TabItem>
<TabItem value="nssm" label="NSSM">
To run jellyseerr as a service:
1. Download the [Non-Sucking Service Manager](https://nssm.cc/download)

View File

@@ -4,6 +4,7 @@
module.exports = {
env: {
commitTag: process.env.COMMIT_TAG || 'local',
forceIpv4First: process.env.FORCE_IPV4_FIRST === 'true',
},
publicRuntimeConfig: {
// Will be available on both server and client

View File

@@ -38,8 +38,10 @@ import path from 'path';
import swaggerUi from 'swagger-ui-express';
import YAML from 'yamljs';
dns.setDefaultResultOrder('ipv4first');
net.setDefaultAutoSelectFamily(false);
if (process.env.forceIpv4First) {
dns.setDefaultResultOrder('ipv4first');
net.setDefaultAutoSelectFamily(false);
}
const API_SPEC_PATH = path.join(__dirname, '../overseerr-api.yml');