Skip to content

Commit a73b7f9

Browse files
committed
Nuke analytics out of proxy
1 parent 3ddd073 commit a73b7f9

4 files changed

Lines changed: 46 additions & 40 deletions

File tree

content/landing-page.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import TechLogo from "../src/components/TechLogo.astro";
22
import TechTable from "../src/components/about/TechTable.astro";
33

44
You've reached the wall of Vivek Raman, a **software engineer** with **4+ years of work experience** pursuing a **Masters degree in Computer Science** at San Jose State University in California.
5-
I'm from Chennai, India.
6-
5+
I'm actively looking for full-time software or AI development opportunities based in the United States.
76
> I am a staunch believer that the user experience makes or breaks a product, and I am obsessed with bringing the best interests of the user to every design decision.
87
98
<TechTable />

nginx.conf

Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Default Nginx configuration
21
user nginx;
32
worker_processes auto;
43
error_log /var/log/nginx/error.log warn;
@@ -38,41 +37,47 @@ http {
3837
gzip on;
3938
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
4039

41-
# Specify DNS resolver for variables, this is Google Public DNS
42-
resolver 8.8.8.8 8.8.4.4 [2001:4860:4860::]:8888 [2001:4860:4860::]:8844 valid=300s;
43-
resolver_timeout 5s; # Timeout for DNS resolution
44-
45-
location ~ ^/hog/static/(.*)$ {
46-
# Check Referer header
47-
set $valid_referer 0;
48-
if ($http_referer ~* "^https?://(localhost|([a-zA-Z0-9-]+)\.?vivekraman\.dev)") {
49-
set $valid_referer 1;
50-
}
51-
if ($valid_referer = 0) {
52-
return 403; # Return forbidden if the Referer header is invalid
53-
}
54-
55-
set $posthog_static "https://us-assets.i.posthog.com/static/";
56-
# use variable to force proper DNS re-resolution, also must manually pass along path
57-
proxy_pass $posthog_static$1$is_args$args;
58-
proxy_set_header Host "us-assets.i.posthog.com";
59-
}
60-
61-
location ~ ^/hog/(.*)$ {
62-
# Check Referer header
63-
set $valid_referer 0;
64-
if ($http_referer ~* "^https?://(localhost|([a-zA-Z0-9-]+)\.?vivekraman\.dev)") {
65-
set $valid_referer 1;
66-
}
67-
if ($valid_referer = 0) {
68-
return 403; # Return forbidden if the Referer header is invalid
69-
}
70-
71-
set $posthog_main "https://us.i.posthog.com/";
72-
# use variable to force proper DNS re-resolution, also must manually pass along path
73-
proxy_pass $posthog_main$1$is_args$args;
74-
proxy_set_header Host "us.i.posthog.com";
75-
}
40+
# Specify DNS resolver for variables
41+
# resolver 8.8.8.8 8.8.4.4 1.1.1.1 1.0.0.1 valid=300s;
42+
# resolver_timeout 5s; # Timeout for DNS resolution
43+
44+
# location ~ ^/hog/static/(.*)$ {
45+
# # Check Referer header
46+
# set $valid_referer 0;
47+
# if ($http_referer ~* "^https?://(localhost|([a-zA-Z0-9-]+)\.?vivekraman\.dev)") {
48+
# set $valid_referer 1;
49+
# }
50+
# if ($valid_referer = 0) {
51+
# return 403; # Return forbidden if the Referer header is invalid
52+
# }
53+
54+
# set $posthog_static "https://us-assets.i.posthog.com/static/";
55+
# # use variable to force proper DNS re-resolution, also must manually pass along path
56+
# proxy_pass $posthog_static$1$is_args$args;
57+
# proxy_set_header Host "us-assets.i.posthog.com";
58+
# proxy_ssl_server_name on;
59+
# proxy_set_header Cookie $http_cookie;
60+
# proxy_set_header Authorization $http_authorization;
61+
# }
62+
63+
# location ~ ^/hog/(.*)$ {
64+
# # Check Referer header
65+
# set $valid_referer 0;
66+
# if ($http_referer ~* "^https?://(localhost:?[0-9]*|([a-zA-Z0-9-]+)\.?vivekraman\.dev)") {
67+
# set $valid_referer 1;
68+
# }
69+
# if ($valid_referer = 0) {
70+
# return 403; # Return forbidden if the Referer header is invalid
71+
# }
72+
73+
# set $posthog_main "https://us.i.posthog.com/";
74+
# # use variable to force proper DNS re-resolution, also must manually pass along path
75+
# proxy_pass $posthog_main$1$is_args$args;
76+
# proxy_set_header Host "us.i.posthog.com";
77+
# proxy_ssl_server_name on;
78+
# proxy_set_header Cookie $http_cookie;
79+
# proxy_set_header Authorization $http_authorization;
80+
# }
7681

7782
# Error pages
7883
error_page 500 502 503 504 /50x.html;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vivekraman.dev",
3-
"version": "3.3-rc3",
3+
"version": "3.3-rc4",
44
"private": true,
55
"scripts": {
66
"dev": "astro dev",

src/layouts/RootLayout.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ const { titlePrefix } = Astro.props;
5555
(e.__SV = 1));
5656
})(document, window.posthog || []);
5757
posthog.init("phc_E8YI0v8PZGTyGe2SlinFiDUiKzkdpq0PK6Nmc46cYaE", {
58-
api_host: "https://vivekraman.dev/hog",
58+
api_host: 'https://us.i.posthog.com',
59+
defaults: '2025-05-24',
60+
person_profiles: 'always',
5961
autocapture: {
6062
css_selector_allowlist: [".ph-capture"],
6163
url_allowlist: [/app\.posthog\.com\/insights/],

0 commit comments

Comments
 (0)