Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🙏 Need help to setup RUM datadog proxy with NGINX #3111

Open
vedansh-kapoor opened this issue Nov 6, 2024 · 2 comments
Open

🙏 Need help to setup RUM datadog proxy with NGINX #3111

vedansh-kapoor opened this issue Nov 6, 2024 · 2 comments

Comments

@vedansh-kapoor
Copy link

I am trying to set up proxy for datadog rum events as a lot of them get blocked by ad-blockers and browsers like brave

I have gone through the documentation at https://docs.datadoghq.com/real_user_monitoring/guide/proxy-rum-data/?tab=npm#proxy-setup
and still failing to set up the proxy in my nginx.conf below -

location /rum-logs/v2/ {
    if ($request_method = OPTIONS) {
        add_header Access-Control-Allow-Origin "*";
        add_header Access-Control-Allow-Methods "GET, PUT, POST, DELETE, OPTIONS";
        add_header Access-Control-Allow-Headers "Content-Type, Authorization, X-Requested-With";
        add_header Access-Control-Allow-Credentials "true";
        add_header Content-Length 0;
        add_header Content-Type text/plain;
        return 204;
     }
     rewrite ^/rum-logs/(.*) /$1  break;
     proxy_redirect off;
     proxy_ssl_session_reuse off;
     proxy_ssl_server_name on;
     proxy_set_header Host datadoghq.com;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_set_header X-Forwarded-Proto $scheme;
     set $datadog_url "https://browser-intake-datadoghq.com";
     set $proxy_pass_url "${datadog_url}${arg_ddforward}";
     proxy_pass $proxy_pass_url;
   }

When I try to print the ${arg_ddforward} in my nginx logs, I can see the URL, but $proxy_pass_url is always an empty string

Can someone help with this? Is some decoding needed? Or any other way to achieve this?

@amortemousque
Copy link
Contributor

amortemousque commented Nov 7, 2024

Hello @vedansh-kapoor,

The best way for us to help you on that front is to reach out to the support.

@vedansh-kapoor
Copy link
Author

vedansh-kapoor commented Nov 8, 2024

@amortemousque Support was not very helpful, redirected me to this #2471 (comment) , which did not work in my case. Still getting HTTP 426 errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants