• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

MaxCDN Referrer Header on inner pages

Status
Not open for further replies.

BigBoiJefe

Chevereto Member
Rodolfo,

If I enable HTTP Referrer Whitelisting, and add my domains, the images on the inner pages return "That page doesn't exist". In speaking with the MaxCDN support team it appears that a referrer header is not being passed for the inner image pages, which makes sense because the thumbnails on the main page are showing just fine.

Thoughts?
 
Which is the website URL? I can't check anything without that.

By the way, I use MaxCDN in the demo and it works without any problems. Most likely the issue is on your server or in your MaxCDN settings.
 
Take this image for example: http://d.gagr.com/2015/05/07/4da15e8d6006.md.jpg (medium version working). If you notice, neither this http://d.gagr.com/2015/05/07/4da15e8d6006.th.jpg (thumb) or this http://d.gagr.com/2015/05/07/4da15e8d6006.jpg (full) is returning something. That's most likely because the CDN is not doing the pull.

When Chevereto does a listing it uses .md image, that's why those are getting pulled. Most likely you have a wrong setup in your server for the CDN so it can't pull the content when try to accessing it directly. Chevereto doesn't touch how your machine serves static files, so I'm afraid that this is something that you will need to dig in your server settings.

For Chevereto demo I use Nginx, and I need to use this rule to avoid issues:
Code:
    location ~ \.(jpe?g|png|gif)$ {
        valid_referers none blocked chevereto.com *.chevereto.com;
        if ($invalid_referer) {
            return   403;
        }
    }
http://nginx.org/en/docs/http/ngx_http_referer_module.html

Problem comes when Chevereto tries to detect if the image url exists. In route.image.php you will find this:
PHP:
$headers = G\getUrlHeaders(preg_replace('/^https:/i', 'http:', $image['file_resource']['chain']['image']));

Which in your case is returning null. An alternative could be that this doesn't ask for those headers if the system has the CDN turned on, but is a fail safe that avoids to display an image page if the image URL doesn't return anything.
 
Last edited:
Sorry I forgot to include that I'm not storing images on my server but rather in an S3 bucket. The md image is working but only if you view the the main site, explore view. If you try to link directly to the image, it doesnt load which is expected. I'm not sure how to get this working.
 
Chevereto doesn't control or modify how your server or external server display static files. I also mentioned how the system detects that something exists in an external URL.

Just read one more time my last reply.
 
Last edited:
Status
Not open for further replies.
Back
Top