OpenCMS - Possible to turn off cookies for a folder with static content? - opencms

With OpenCMS version 7.x, is it possible to specify a folder as not requiring cookies to be served with its contents, e.g. images etc that don't need cookies to bloat the request?

This is not an OpenCms feature, you'd have to configure this in your application server.

Related

Node Js files protection

How can I protect my Node JS files to achieve similar behavior to a PHP file case? I would like to defend it to make it unable to download or display the inner content if anyone knows the URL of the file on the server.
Unless your Node.js server serves its own application directory as static files (or if there's a separate web server that expose them), the source code is not accessible.
Unlike with PHP, the JavaScript source code doesn't need to be anywhere near the hierarchy served by a web server.

How do I host my webapp (made using HTML, CSS, JS, node and express) on GoDaddy hosting (cPanel)? I've already purchased a domain and hosting at it,

I've already made a webapp using HTML, CSS, JS, node and express. Now I want to host it on GoDaddy. I've already purchased its domain and hosting. But the only option i'm observing frequently says WORDPRESS hosting (i'm assuming it says to build website on wordpress which I don't want to). I have the access to its cPanel but IDK how to use it (properly).
In order to host your site, you just need to upload all your files via FTP to your root folder. From your explanation above, it should be basic website. You can just upload your files to your root folder. If you encounter issue, you can contact their support team.

How does jHipster serve static files but not from META-INF/** and WEB-INF/**?

I noticed that applications generated by jHipster serve almost all file content available from the WAR artifact. For example, if there is a file README.MD next to index.html, it can be accessed via http://localhost:8080/README.MD.
The only files that aren't served are those files within the META-INF/ and WEB-INF/ directories.
Where does a jHipster application's source code configure to serve arbitrary files but not files from META-INF/** and META-INF/**?
There is no configuration at all, it's part of the Servlet specification: both of those directories are secured by the servlet container, without doing anything specific.
You might be confused because many people store their files in WEB-INF, for example WEB-INF/jsp/ for the JSP files. People do this to protect those files from being accessed directly, and have a Controller (like a Spring MVC controller or Struts controller) that redirects to those pages once it has processed the request.
JHipster works differently, as it only has static pages that do REST requests to the back-end, so it's a different architecture.

Using CDN with Liferay

We are using CDN for our custom theme. Now we want to do same for all Liferay static resources(js,images,css and fonts). Has anyone done this before? We are planning to move whole /html of ROOT to CDN. But we faced some issues regarding compass from some css files which imports compass. What is the ideal scenario while uploading Liferay's static resources to CDN? Any help? We are using cdn.host.http in portal-ext.properties.
Do not move resources from the webapp to the CDN! A lot of those things are not actual resources, but more of a ‘source’! For example, the css in the ROOT/html are actually SASS files and will not work if moved as is. The best solution is to use a Squid-like proxy to cache resources from the actual tomcat portal as they are requested.

Caching problem

I have a web page with a set of images and java script files.
I want to cache all the images+java script other than a single image which is the logo.
Is this possible ? and how would I do it ?
I am using IIS server.
Yes. Just configure your server to have a default cache configuration for images and JS, and then override it for the logo. Possibly with a <file> block if you are using Apache.
See this decent caching tutorial.

Resources