You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Esta PR tem como objetivo corrigir o erro Refused to apply style from 'http://localhost:3000/estilo.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled que ocorre em rotas que retornam páginas LMHT. O problema está relacionado à forma como o Express lida com rotas que retornam páginas LMHT, resultando em um erro 500 ao tentar acessar essas rotas.
Alterações
Arquivos alterados para trabalhar com o caminho absoluto do diretório, em vez do caminho relativo, garantindo que o arquivo CSS seja servido corretamente.
Ganhos
Com essa alteração, o erro de MIME type será resolvido, permitindo que as páginas LMHT sejam carregadas corretamente com o estilo aplicado. Fix#89
@Joaolpridolficarvalho Eu não acho que essa PR seja necessária, até porque me parece pela mensagem de erro (Refused to apply style from 'http://localhost:3000/estilo.css'...) que o arquivo simplesmente não existe dentro de publico. Você chegou a testar o LMHT referenciando /css/estilo.css?
@Joaolpridolficarvalho Eu não acho que essa PR seja necessária, até porque me parece pela mensagem de erro (Refused to apply style from 'http://localhost:3000/estilo.css'...) que o arquivo simplesmente não existe dentro de publico. Você chegou a testar o LMHT referenciando /css/estilo.css?
Testei. O problema deve estar na forma como o Express está servindo a página.
@Joaolpridolficarvalho Eu não acho que essa PR seja necessária, até porque me parece pela mensagem de erro (Refused to apply style from 'http://localhost:3000/estilo.css'...) que o arquivo simplesmente não existe dentro de publico. Você chegou a testar o LMHT referenciando /css/estilo.css?
Testei. O problema deve estar na forma como o Express está servindo a página.
Então na verdade temos que pensar numa forma de ter essa configuração usando arquivos configuracao.delprops. Vai bem além do que essa PR se propõe.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Descrição
Esta PR tem como objetivo corrigir o erro
Refused to apply style from 'http://localhost:3000/estilo.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabledque ocorre em rotas que retornam páginas LMHT. O problema está relacionado à forma como o Express lida com rotas que retornam páginas LMHT, resultando em um erro 500 ao tentar acessar essas rotas.Alterações
Ganhos
Com essa alteração, o erro de MIME type será resolvido, permitindo que as páginas LMHT sejam carregadas corretamente com o estilo aplicado.
Fix #89