Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

112
Visualizações
NGINX return 410 for deleted CSS and JS files

I have a problem with a plugin I've deleted, apparently the cache on the users browser still send request for some JS and CSS files that are gone, the problem is that this is causing a lot of 404 errors in the logs (in 1 day I generated 4GB of error logs only containing the 404 deleted CSS and JS files).

I was trying to create a setting on NGINX that will send a 410 response to everyone that was trying to access the missing JS and CSS files, the path of the files is the same:

/wp-content/cache/autoptimize/js/autoptimize_single_32ab5663ad75c559c9af68098a1b63e6.js

/wp-content/cache/autoptimize/css/autoptimize_32c1c99d8f7a5a9618074737134c8f9c.css

I tried various location settings I found online for both all files that contains autoptimize_*.css and js and the folder /autoptimize, but it didn't work, it was like this:

location ^~ /autoptimize { return 410; }

What I'm missing?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Try :

location ^~ /wp-content/cache/autoptimize/ { return 410; }
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda