6 votes
Accepted

Magento 2 CORS & CDN

So I spent sometime working through this. It appears you can't Header set inside of a FilesMatch I fixed the issue using the following inside of my pub/static/.htaccess <IfModule mod_headers....
Eirik's user avatar
  • 2,072
6 votes
Accepted

Magento 2: What is Offloader header?

There is no difference. The default offloader header in Magento 2 is X-Forwarded-Proto, which matches the de facto standard. SSL_OFFLOADED on the other hand, was the default offloader header in ...
Fabian Schmengler's user avatar
5 votes

Magento 2: How to Solve Defer parsing of JavaScript on CDN?

In Observer method $response = $observer->getEvent()->getData('response'); if (!$response) return; $html = $response->getBody(); if ($html == '') ...
Pratik's user avatar
  • 3,805
4 votes
Accepted

Adding jQuery doesn't seem to do anything

As you mentioned that you should use $j because of the noConflict() I'm pretty you can fix your issue by replacing: jQuery.noConflict(); With: $j = jQuery.noConflict(); Edit: the problem was that ...
Raphael at Digital Pianism's user avatar
4 votes
Accepted

Is it possible to serve images from Magento 2 using a URL reference?

You can tell Magento to use static files and media files from a CDN from the admin dashboard. Go to Stores > Configuration. Under the Web tab you can link the CDN in Base URL for Static View Files and ...
Adrian Z.'s user avatar
  • 707
4 votes

Varnish purge is not working when clean the magento cache

1- check varnish port using : sudo netstat -ltnp in my case it's port 80 2-Update cache host using php bin/magento setup:config:set --http-cache-hosts=xx.xx.xxx.xxx:80 here i'm using port 80 ...
Tarek Adra's user avatar
3 votes

Magento 2: What is Offloader header?

Offloader header and HTTPS server variable are used by Magento 2 to figure out if request is secure (https). if you don't set server variable HTTPS fastcgi_param HTTPS on then magento checks ...
Konstantin Gerasimov's user avatar
3 votes

Static Images Not Loading to CDN

Because your image-urls are hardcoded in css: To fix this problem, do the following: disable css-merging from backend (System -> Configuration -> ADVANCED -> Developer then CSS Settings and set ...
Christoph Farnleitner's user avatar
3 votes

Getting cloudflare to work with magento 2

The article you mention is something that was written for Magento 1.8 onwards. At the time of Magento 1, there was no full page caching solution other than varnish. For instance, this article mentions ...
Herve Tribouilloy's user avatar
3 votes

Cloudflare with Magento

There is more to it than just caching such as image, session and browser optimisation. See more here - https://www.cloudflare.com/features-optimizer/
Ben Crook's user avatar
  • 15.7k
3 votes

Magento 2: Overiding Admin Theme not working in Production Mode with CDN [SOLVED]

When creating a new custom theme, if we don't have any assets files under web folder, your theme may be ignored when executing deploy command.
Khoa TruongDinh's user avatar
2 votes

Magento 2 - How to use font awesome icons using cdn url?

To add external static resources like CSS, JavaScript, Web fonts (Fontawesome in this case), Please follow the steps below. Go to this link and copy the CDN URL of Fontawesome. Find the file app/...
Milan Chandro's user avatar
2 votes

Magento 2 - How to use font awesome icons using cdn url?

You have to use absolute url instead of relative url to import font in css file like : ../font/fontfilename => http://www.yourdomain/skin/frontend/namespace/theme/font/fontfilename
Ashish Jagnani's user avatar
2 votes
Accepted

Use CDN url instead of image path with mysql bulk import

After some research on how to override a function on a Model, I've created my own module/extension. This extension extends the Mage_Catalog_Model_Product_Image Model and this is what I've changed to ...
Nesse's user avatar
  • 228
2 votes

Observer (event hook) for media or images

First the credit https://stackoverflow.com/questions/8182009/get-product-changes Now the solution. Hook into the catalog_product_save_before event and use the following observer to work out if ...
user2023210's user avatar
2 votes

Magento 2: How to Solve Defer parsing of JavaScript on CDN?

Magento 2: How to add css and js in custom module in magento 2? Add defer attribute in javascript solve some level of my issue <script type="text/javascript" defer="defer" src="js/myjs.js">&...
Ketan Borada's user avatar
  • 2,603
2 votes
Accepted

Help configure cloudflare for magento 1.9

No, you don't need to change anything on your web settings. You can leave them as {{secure_base_url}}skin/ {{secure_base_url}}media/ etc.
Mehdi's user avatar
  • 878
2 votes

Varnish purge is not working when clean the magento cache

php bin/magento setup:config:set --http-cache-hosts=127.0.0.1:6081 worked for us. BUT Varnish restart and cache flush wasn't enough. We needed to restart PHP-FPM as well
Harvey's user avatar
  • 21
2 votes

CORS error - HTML and fonts not working properly with CloudFront CDN

I had this same issue recently. Changing the below Header set Access-Control-Allow-Headers "Host, Content-Type, Origin, Accept" TO Header set Access-Control-Allow-Headers "Host, Content-Type, ...
Nadroj467's user avatar
  • 571
2 votes
Accepted

How to direct include Vue.js <script> in Magento 2?

In magento you should avoid inject direct script in templates like <script defer="" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script> Not like that ...
mrtuvn's user avatar
  • 3,273
2 votes

How to implement Cloudways CDN on Magento2

You can configure separate domain for static content Login to Magento Admin and set "Base URL for Static View Files" and/or "Secure Base URL for Static View Files" in Stores > Configuration > Base ...
KAndy's user avatar
  • 20.8k
2 votes
Accepted

Magento 2.3.5-p1 CDN Configuration Content Security Policy directive

For me, the only solution was to add a module for CSP exceptions. app/code/mycompany/Csp in the /etc dir, add a file called csp_whitelist.xml <?xml version="1.0"?> <csp_whitelist ...
web master's user avatar
1 vote
Accepted

How to use Magento 2.3 and Cloudfare CDN?

You don't need to configure a different URL to media and static files; Since Cloudflare manages your domain, it'll deliver the static content using their CDN and get the dynamic content from your ...
Rafael Corrêa Gomes's user avatar
1 vote

CORS error - HTML and fonts not working properly with CloudFront CDN

Way-1: pub/static:The path to change the configuration of pub/static is pub/static/.htaccess The origin file <IfModule mod_headers.c> <FilesMatch .*\.(ico|jpg|jpeg|png|gif|svg|js|css|swf|...
matinict's user avatar
  • 1,549
1 vote

Link CDN url to my product saved in magento 2

If you want to set this for Products only, then you could create a custom product attribute, set the external link there. Customise the Product listing and details page to fetch image from the CDN ...
Abdul Pathan's user avatar
  • 2,802
1 vote

Sync google cloud storage with CDN to products images

create product in magento with images, then you sync media base folder to GCS. https://cloud.google.com/storage/docs/quickstart-gsutil or you can use special extension that automates it for you: ...
MagenX's user avatar
  • 3,820
1 vote

Varnish purge is not working when clean the magento cache

I have used only the following command with my exiting varnish magento 2 setup and its working fine, php bin/magento setup:config:set --http-cache-hosts=0.0.0.0:8080,0.0.0.0:80 My Ngnix http traffic ...
Venthan's user avatar
  • 11
1 vote
Accepted

Varnish purge is not working when clean the magento cache

It is because of we missed to add our server ip address to the access list of varnish server. We can add our ip address also in the Access List field of Varnish configuration. If you use your own ...
SIBHI S's user avatar
  • 2,055
1 vote

Getting cloudflare to work with magento 2

My first answer does not provide a solution and rather attempts to convince that Cloudflare is not the system to look at to find this solution. This answer assumes you are using Magento built-in Full ...
Herve Tribouilloy's user avatar
1 vote
Accepted

Where do I point my "Secure Base URL for Static View Files" for CDN in Magento 2?

For remove version from url (like version1490119662), Try following way: From core_config_data table set 'dev/static/sign' to 0 OR From Admin -> Stores -> Configuration -> Advanced -> Developer -> ...
Sohel Rana's user avatar
  • 35.8k

Only top scored, non community-wiki answers of a minimum length are eligible