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

218
Visualizações
How can i prevent them from entering to an address? (express)

I am using /style for style.css and am using this code;

app.get("/style", (req, res) => res.sendFile(__dirname + "/assets/style.css"))

I don't want them to enter to /style address and steal styles, so i want people to get an error that they enter the /style address. How can i do?

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

0

There is no difference between a URL in <link rel="stylesheet" url=.. and a URL that the user enters in the browser address bar.

Both are endpoints that the browser needs to GET. You can put your whole app behind an authenticated endpoint. But once the client is authenticated and the page is rendered, the users may use dev tools to see your styles.

As an alternative you can use tools to minimize and obfuscate the styles. It makes sense for minification and optimization purposes, but not for protecting the sources. I would also consider what you are trying to protect (CSS styling is not a trade secret and you can copyright your logo/brand style to protect it).

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