Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

update configs

Blue Mouse8bf3b65eec84
diff --git a/docs/adblockers/guides/nextjs.md b/docs/adblockers/guides/nextjs.md
index cd70e7a0c..b561aeaf1 100644
--- a/docs/adblockers/guides/nextjs.md
+++ b/docs/adblockers/guides/nextjs.md
@@ -12,8 +12,8 @@ module.exports = {
async rewrites() {
return [
{
- source: "/sproxy",
- destination: "https://api.swetrix.com/log",
+ source: "/sproxy/:path*",
+ destination: "https://api.swetrix.com/log/:path*",
},
];
},
diff --git a/docs/adblockers/guides/nginx.md b/docs/adblockers/guides/nginx.md
index 3961bd1d9..c567c954d 100644
--- a/docs/adblockers/guides/nginx.md
+++ b/docs/adblockers/guides/nginx.md
@@ -22,8 +22,8 @@ server {
# Using the Cloudflare DNS resolver, you can remove this line if you already use a resolver in your config, or change it to a resolver of your choice.
resolver 1.1.1.1;
- set $swetrix_script_url https://swetrix.org/swetrix.js;
- set $swetrix_log_url https://api.swetrix.com/log;
+ set $swetrix_script_url https://swetrix.org/swetrix.js;
+ set $swetrix_api_url https://api.swetrix.com;
location = /script.js {
proxy_pass $swetrix_script_url;
@@ -36,15 +36,15 @@ server {
proxy_cache_use_stale updating error timeout invalid_header http_500;
}
- # Setting the path to /log is optional, you can replace it with anything you want, like /proxy, /endpoint, etc.
- # Some aggressive adblockers may block requests to paths like /analytics, /collect, /log, etc.
- location = /log {
- proxy_set_header Host $host;
- proxy_set_header X-Client-IP-Address $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_buffering on;
- proxy_pass_request_headers on;
- proxy_pass $swetrix_log_url;
+ location /log {
+ proxy_set_header Host $host;
+ proxy_set_header X-Client-IP-Address $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $scheme;
+
+ proxy_buffering on;
+ proxy_pass_request_headers on;
+
+ proxy_pass $swetrix_api_url;
}
}
```