Search…

X3 Photo Gallery Support Forums

Search…
 
alderim
Experienced
Topic Author
Posts: 56
Joined: 27 Jun 2007, 09:49

DSGVO Data Protection Amazon Cloudfront

06 Jun 2018, 05:57

Hi,

Yes, European Data Protection again. Sorry.

The head of security issues is asking if it is maybe possible to run the system without Amazon Cloudfront because of reasons..

I don´t think so, right?

thx!
 
User avatar
mjau-mjau
X3 Wizard
Posts: 11298
Joined: 30 Sep 2006, 07:37

Re: DSGVO Data Protection Amazon Cloudfront

06 Jun 2018, 09:00

Not a problem. Go to Settings > Advanced, and disable "Use CDN". This will cause all Javascript and CSS resources to be loaded from your own website, instead of from content delivery networks.
Image

Keep in mind, this is unproductive. The point of using CDN, is for assets to load faster, from server locations closer to the visitor. Also, since multiple websites use the same assets, chance is it will be cached in the visitors browser already. If most of your visitors are located in the same country as your web hosting, this should not be a noticeable issue. If you have visitors from other countries, especially other continents, then CDN's will provide great performance benefit when loading your website.

In next X3.25.0, even more resources will be loaded from JSDelivr CDN (when CDN option is enabled). You will always be able to disable CDN.
 
alderim
Experienced
Topic Author
Posts: 56
Joined: 27 Jun 2007, 09:49

Re: DSGVO Data Protection Amazon Cloudfront

07 Jun 2018, 08:44

Thank you!
 
humantex
Posts: 2
Joined: 08 Nov 2018, 13:39

Re: DSGVO Data Protection Amazon Cloudfront

08 Nov 2018, 19:35

I'm running a demo install of 3.25.1 at the moment, and there's one instance where toggling the CDN option will not work to localize the serving of CSS files... the admin panel. From my viewpoint there's far too much bright-white background for working comfortably while using a 23" HD wide screen. Sorry, but ft's like trying to work in the middle of winter with the sun blazing at high noon on fresh snow.

Using FireFox's dev panel, I tracked down the 4 CSS entries I needed to change. I opened the 'x3.panel.css' file, copied it out to unminify it, pasted it back, made the changes and saved... then refreshed the browser to see that nothing had changed. rechecking dev tools confirmed that the CDN was still active, and it's not reading the local version.

I haven't tried it, but I doubt I can add an entry into Custom CSS to override the admin side. I suppose the question would be... is there another option to change the default behavior, or is a code change needed to uncouple the CDN link on the backend? If this isn't possible unless the code is modified, could a second toggle for the admin panel be added into a future release? Then the front-end doesn't get effected by loosing CDN accessibility.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 11298
Joined: 30 Sep 2006, 07:37

Re: DSGVO Data Protection Amazon Cloudfront

09 Nov 2018, 05:28

humantex wrote:I'm running a demo install of 3.25.1 at the moment, and there's one instance where toggling the CDN option will not work to localize the serving of CSS files... the admin panel.
To simplify things, the large mass of external plugins used in the X3 panel are always loaded from JSDelivr CDN. x3.panel.css is not loaded from CDN though.
humantex wrote:From my viewpoint there's far too much bright-white background for working comfortably while using a 23" HD wide screen. Sorry, but ft's like trying to work in the middle of winter with the sun blazing at high noon on fresh snow.
Not sure if you mean this had anything to do with the CDN option on/off or not. X3 panel is based on Bootstrap 3.*, where these colors are default (https://getbootstrap.com/docs/3.3/). If you want to edit colors, you would edit/add your own CSS, as it would be pointless to edit the bootstrap CSS, regardless if it is on CDN or loaded from local.

There is a trick to include your own CSS into the panel. Add a file panel.css into the /config/ folder (eg. /config/panel.css). When this file exists, it will be included in the panel. Keep in mind, you may need to set background-color on more than just the body if you want to customize the panel style.

Some time soon we are planning X3 panel 2.0, where there will definitely be a "dark" version available.
humantex wrote:Using FireFox's dev panel, I tracked down the 4 CSS entries I needed to change. I opened the 'x3.panel.css' file, copied it out to unminify it, pasted it back, made the changes and saved... then refreshed the browser to see that nothing had changed. rechecking dev tools confirmed that the CDN was still active, and it's not reading the local version.
The file x3.panel.css does not load from CDN. It always loads from local path filemanager_css/x3.panel.css. If you have edited it and can't see any changes, this is likely related to your browser cache and even possibly proxy cache (if you are using something like Cloudflare). You will need to make sure to empty your browser cache, or use "Private browser" mode to make sure fresh CSS is loaded.

It would be better to use the approach explained with /config/panel.css file instead though. When using this approach, the CSS is included inline into the document, so you won't have any issues with browser-caching either.
humantex wrote:I haven't tried it, but I doubt I can add an entry into Custom CSS to override the admin side. I suppose the question would be... is there another option to change the default behavior, or is a code change needed to uncouple the CDN link on the backend? If this isn't possible unless the code is modified, could a second toggle for the admin panel be added into a future release? Then the front-end doesn't get effected by loosing CDN accessibility.
So ... You CAN edit CSS, and x3.panel.css is not loaded from CDN ... But the recommended approach is to add your styles into custom file /config/panel.css.
 
humantex
Posts: 2
Joined: 08 Nov 2018, 13:39

Re: DSGVO Data Protection Amazon Cloudfront

09 Nov 2018, 18:24

Thanks for the help and pointing me in the right direction. I had it done in less than 5 minutes, and without disabling anything. It didn't occur to me that there would be an override file name available that could be read and used.

I wasn't really looking to turn it into a 'dark' style - just more subdued than what it was, and also to bump up the contrast of the text in the tree menu a little more.

End result...
Image
...and the 4 values I modified...
Code
body {
    background: #dadada;
}
#menu-container {
    background: #dadada;
}
ul.mtree li[id="_custom"] a, ul.mtree li[id="_custom"] a:hover{
    color: #1e91b3;
}
ul.mtree li > a {
    color: rgba(0, 0, 0, 0.7);
}
 
User avatar
mjau-mjau
X3 Wizard
Posts: 11298
Joined: 30 Sep 2006, 07:37

Re: DSGVO Data Protection Amazon Cloudfront

10 Nov 2018, 05:14

Nice!