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

Custom Logo and reverse proxy with patch #3318

Closed
anonymous-matomo-user opened this issue Aug 13, 2012 · 7 comments
Closed

Custom Logo and reverse proxy with patch #3318

anonymous-matomo-user opened this issue Aug 13, 2012 · 7 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@anonymous-matomo-user
Copy link

Hi there,

There is a small bug affecting our Piwik's deployments with custom logo.

Internally we are using a Vhost on our VPN : piwik.ourcompany.com but to connect to Piwik but for our customers we are using a reverse proxy in www.ourcustomer.com/piwik/

Putting a reverse proxy allow us to remove warning from browsers regarding SSL certificates. This way the only SSL certificate seen is the one from our customer's website.

With the current Piwik code (1.8.2) the URL generated for the logo is www.ourcustomer.com/themes/logo.png instead of www.ourcustomer.com/piwik/themes/logo.png. The custom logo is displayed correctly however internally.

I attached a very simple patch to use the relative URL and solve this bug. With this the the logo is displayed correctly both internally and through the reverse proxy, as well as in PDF reports.

Let me know if there is a valid reason behing using Piwik::getPiwikUrl() instead of the relative URL.

Cheers
LeTic

Update : Remove http's to not be considered a spammer

@anonymous-matomo-user
Copy link
Author

Attachment: Custom logo - Reverse proxy issue - Patch
piwik_custom_logo.patch

@robocoder
Copy link
Contributor

Absolute URLs are required for HTML reports where the base tag is not used (due to poor email client support).

I'm surprised it works with PDF reports. Does it still work if you save the report to your desktop, and then open it locally?

Returning a path when the $pathOnly == false is contrary to the intent of that API method. So, this isn't the right fix either way.

This scenario requires that we revisit #2501 which was also proxy related.

@mattab
Copy link
Member

mattab commented Aug 26, 2012

@letic would you mind taking a look at anthon's questions at #3318 ? Thanks!

@anonymous-matomo-user
Copy link
Author

Sorry guys, I did some more testing but wanted to investigate further before replying.

Yes it does work for PDF saved locally opened with Evince. HTML report received in Icedove are indeed missing the custom logo.

r4946 linked doesn't seems to be proxy related. Probably several commits were used to solve #2501

@mattab
Copy link
Member

mattab commented Dec 14, 2012

wont apply this patch, please reopen if you have working patch, thanks

@anonymous-matomo-user
Copy link
Author

We are facing the same problem with piwik setup behind a reverse proxy. The reverse proxy will proxy requests to example.org/analytics to the piwik web server with piwik installed in subfolder piwik within the document root.

Consequence is, that the piwik logo won't show up because the URI https://example.org/piwik/themes/default/images/logo.svg is used whereas https://example.org/analytics/piwik/themes/default/images/logo.svg would be correct in this case.

This also leads to the Real Time Visitor Map not being usable because several files won't be loaded (world.svg, cities.png, regions.png, ). Instead an empty content div is displayed.

@mattab
Copy link
Member

mattab commented Jul 23, 2013

If you have a working patch, I would consider it, otherwise I dont know how to solve this problem

@anonymous-matomo-user anonymous-matomo-user added this to the 1.x - Piwik 1.x milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

3 participants