Remove Compare feature from Magento 2

How to remove “Add to Compare” links in sidebar and product page in Magento 2 product pages

Magento 2 Community has a default feature of comparison lists for multiple products. Learn how you can disable the “Add to Compare” feature in magento2 community edition.

Add the following lines in default.xml of your theme folder

	<referenceBlock name="catalog.compare.sidebar" remove="true"/>
	<referenceBlock name="catalog.compare.link" remove="true"/>
	<referenceBlock name="related.product.addto.compare" remove="true"/>
	<referenceBlock name="view.addto.compare" remove="true"/>
	<referenceBlock name="upsell.product.addto.compare" remove="true"/>

CORS policy for subdomains – htaccess – apache server

Works for Magento 2.2x

Cross-Origin Resource Sharing header for Access-Control-Allow-Origin for Subdomains

SetEnvIf Origin "^(.*\.yourdomain\.com)$" OSD=$1
Header set Access-Control-Allow-Origin "%{OSD}e" env=OSD
Header set Access-Control-Allow-Methods: "*"
Header set Access-Control-Allow-Headers: "*"

or a general format for simple copy paste:

SetEnvIf Origin "^(.*)$" OSD=$1
Header set Access-Control-Allow-Origin "%{OSD}e" env=OSD
Header set Access-Control-Allow-Methods: "*"
Header set Access-Control-Allow-Headers: "*"