Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

220
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!