Problem with CSS when setting up Cloudflare
We need to solve a problem with the website after connecting Cloudflare
cloudfare because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.Briefly, our understanding of the problem:
CF says that the CSS file is not a CSS file, but something unclear, and therefore it does not serve it as a CSS file, which Chrome complains about
From this, the question arises
What server setting affects the static style file specifically for display in Cloudflare, or what could be wrong with the website, since this problem does not occur on all websites
Please respond only if you have already encountered and solved a similar problem
-
186 I corrected something similar earlier. First of all, your assumptions are somewhat inaccurate, although sometimes they can indeed be true. In fact, such an error can occur due to:
1. CSS/JS file not found, and instead, the server returns HTML (most likely a 404).
2. Error in MIME-type configuration (unlikely).
3. If you have some SPA on conditional React, Vue, etc., and you are using CloudFlare Pages - then the default fallback may trigger on a non-existent path. However, it will return not a 404, but some HTML with a status of 200 OK.
If you provide the full text of the error in private, along with the URL, I can give a more precise answer regarding the timing and cause.
-
272 2 0 Hello, there was a similar problem, solution 15 minutes. Write in private.
-
4926 88 0 Good day, Dmytro
I will correct it within 1 hour
Write in private messages, I will start immediately
-
3623 55 2 Good day, Dmitry
I have experience solving similar tasks, I will do it today during the day!
It could be a broken path to the file, or an incorrect name, or another Cloudflare error when extracting CSS
-
12593 600 0 Good day, I can correct it - feel free to contact me....................
-
952 31 1 Hello. I would like to discuss in more detail in private messages.
-
6082 54 0 Good day, can you show screenshots of the errors so we can see the error itself?
-
MIME-типи вказуються в налаштуваннях веб-сервера, і зазвичай css входить в дефолтний перелік. Ось, наприклад, дефолтна конфігурація для nginx: https://github.com/nginx/nginx/blob/master/conf/mime.types
Скажіть, який у вас веб-сервер, підкажу, як пофіксити проблему
-
Current freelance projects in the category PHP
Modules for a website on Laravel
90 USD
Delivery and payment module for the site https://novabook.top/ (Botble CMS / Laravel) Add convenient delivery and payment methods (including installment plans) in the checkout, similar in style and convenience to the mirson ua site.Delivery (mandatory) Nova Poshta Branch… Javascript and Typescript, PHP ∙ 4 hours 6 minutes back ∙ 14 proposals |
Integration needed: KeyCRM → Cash Register KashalotIt is necessary to set up integration between KeyCRM and the Cash Register Kahalot. When placing an order in KeyCRM, the data must be automatically transmitted to Kahalot: • order information • products, nomenclature • prices • quantity More details in private. Content Management Systems, PHP ∙ 2 days 3 hours back ∙ 28 proposals |
Development of 2 SEO-oriented websites for selling spare parts (ATVs and special equipment)Development of Two Specialized Websites for Selling Spare PartsGeneral Information It is necessary to develop two specialized websites: Spare parts for ATVs, UTVs, SSVs, and other similar equipment. Spare parts for special equipment. Existing company website:… PHP, Web Programming ∙ 4 days 10 hours back ∙ 77 proposals |
Development of a WordPress website
23 USD
We are looking for a contractor to develop a custom website on WordPress for a jewelry store. The first stage will be a consultation. Content Management Systems, PHP ∙ 7 days 2 hours back ∙ 75 proposals |
Parser expireddomains.net
112 USD
A parser is needed for expireddomains.net. You need to log in to the site first; the problem is that it blocks the IP when trying to parse data. You need to parse thematic domains based on a list of keywords. If you are not confident in your abilities, please do not write. PHP, Web Programming ∙ 9 days 10 hours back ∙ 53 proposals |