Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Ruby Grape Api extension with Cross-origin resource sharing
class API < Grape::API
get :info do
#> some logic here
end
end
Grape::CORS.apply!
#> and ready to use!
In case if you need to use the 'options' call, you should use by hand the following method:
if you want change any of the cors object, you can do so in the following way:
#> Defaults
Grape::CORS::Config.headers #> [ 'Content-Type' ]
Grape::CORS::Config.origin #> [ '*' ]
Grape::CORS::Config.methods #> [ 'HEAD', 'OPTIONS', 'GET', 'POST', 'PUT', 'DELETE' ]
Grape::CORS::Config.acah #> 'Access-Control-Allow-Headers'
Grape::CORS::Config.acao #> 'Access-Control-Allow-Origin'
Grape::CORS::Config.acam #> 'Access-Control-Allow-Methods'
Grape::CORS::Config.origin.clear
Grape::CORS::Config.origin.push(some_origin_site)
Happy coding! :)
FAQs
Unknown package
We found that grape-cors demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.