i3.github.io | The i3wm.org website | Web Site library
kandi X-RAY | i3.github.io Summary
kandi X-RAY | i3.github.io Summary
This is the source code for the official i3 website:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of i3.github.io
i3.github.io Key Features
i3.github.io Examples and Code Snippets
Community Discussions
Trending Discussions on i3.github.io
QUESTION
TLDR: I read that the "origin" header can be set manually for requests, and that CORS policy are only securing browser requests. how can I make my app securely send data to allowed origins ?
I am making a personal server with express that fetches and deliver data from multiple sources to multiple targets, including a static website
On this api I use a few express routes & socket.io, but to keep it simple i am only going to talk about express routes.
I already implemented CORS policy by adding an Access-Control-Allow-Origin
header in the response, but I could read that CORS are not enabled for program or server requests (like curl
)
So I added a little logic to check if the "origin" header was in my whitelist, like this :
...ANSWER
Answered 2021-Mar-17 at 16:03It looks like you will need more then CORS for your Problem.
Try to implement an authentication system with A JSON Web Token (https://jwt.io/)(https://www.youtube.com/watch?v=7Q17ubqLfaM) or Sessions (https://www.npmjs.com/package/express-session), because Headers can be set manually and can be unreliable.
If you have the capabilities, also Try to look into HTTPS, it's more secure, this Thread has more Information on that: Enabling HTTPS on express.js
And be sure to have a look at the cors module (https://www.npmjs.com/package/cors)! It can be configured for your needs. Just look into the documentation
Have a nice day!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install i3.github.io
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page