diff --git a/.gitignore b/.gitignore index adbb97d..b7d511e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -data/ \ No newline at end of file +data/ +*.log \ No newline at end of file diff --git a/config.json b/config.json index 3ca3b0c..dc9d7f1 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { - "base_url": "http://localhost:8080/s", + "base_url": "https://xcel.me/s", "api_key": "change-this-secret-key", "host": "0.0.0.0", "port": 8080, @@ -7,9 +7,9 @@ "retention_days": 0, "min_short_length": 6, "max_short_length": 32, - "max_url_length": 2048, + "max_url_length": 131072, "max_retention_days": 3650, - "rate_limit_requests": 60, + "rate_limit_requests": 10, "rate_limit_window": 60 } diff --git a/data/.gitignore b/data/.gitignore new file mode 100644 index 0000000..3997bea --- /dev/null +++ b/data/.gitignore @@ -0,0 +1 @@ +*.db \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index e523ef7..e2ca5f0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: working_dir: /app command: ["python", "-u", "urlshort.py", "config.json"] ports: - - "8080:8080" + - "127.0.0.1:18082:8080" volumes: - ./urlshort.py:/app/urlshort.py:ro - ./config.json:/app/config.json:ro diff --git a/nginx.conf b/nginx.conf index 2d7a98b..0e613a1 100644 --- a/nginx.conf +++ b/nginx.conf @@ -36,7 +36,7 @@ location ^~ /s/static/ { # --- Proxy everything else under /s/ to the Python backend --- # Covers: /s/api/shorten, /s/api/urls, /s/api/lookup, /s/ redirects location /s/ { - proxy_pass http://urlshort:8080; + proxy_pass http://127.0.0.1:18082; proxy_http_version 1.1; proxy_set_header Host $host;