Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/Medzoner/traefik-plugin-cors-preflight
Pass the browser cors preflight with response status 204 for Method OPTIONS
Requirements: Traefik >= v2.5.5
--pilot.token=xxx
--experimental.plugins.corspreflight.modulename=github.com/Medzoner/traefik-plugin-cors-preflight
--experimental.plugins.corspreflight.version=v1.0.4
pilot:
token: xxx
experimental:
plugins:
corspreflight:
modulename: github.com/Medzoner/traefik-plugin-cors-preflight
version: v1.0.4
[pilot]
token = "xxx"
[experimental.plugins.corspreflight]
modulename = "github.com/Medzoner/traefik-plugin-cors-preflight"
version = "v1.0.4"
testData:
testData:
Code: 204
Method: 'OPTIONS'
To configure the CorsPreflight
plugin you should create a middleware in your dynamic configuration as explained here.
http:
middlewares:
corspreflight-middleware:
plugin:
corspreflight:
errorCode: 200
routers:
my-router:
rule: Host(`localhost`)
middlewares:
- corspreflight-middleware
service: my-service
services:
my-service:
loadBalancer:
servers:
- url: 'http://127.0.0.1'
[http.middlewares]
[http.middlewares.corspreflight-middleware.plugin.corspreflight]
errorCode = 200
[http.routers]
[http.routers.my-router]
rule = "Host(`localhost`)"
middlewares = ["corspreflight-middleware"]
service = "my-service"
[http.services]
[http.services.my-service]
[http.services.my-service.loadBalancer]
[[http.services.my-service.loadBalancer.servers]]
url = "http://127.0.0.1"
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: corspreflight-middleware
spec:
plugin:
corspreflight:
errorCode: 200
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: whoami
spec:
entryPoints:
- web
routes:
- kind: Rule
match: Host(`whoami.localhost`)
middlewares:
- name: corspreflight-middleware
services:
- kind: Service
name: whoami-svc
port: 80
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: corspreflight-middleware
spec:
plugin:
corspreflight:
errorCode: 200
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myingress
annotations:
traefik.ingress.kubernetes.io/router.middlewares: default-corspreflight-middleware@kubernetescrd
spec:
rules:
- host: whoami.localhost
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: whoami
port:
number: 80
version: '3.7'
services:
whoami:
image: traefik/whoami:v1.7.1
labels:
traefik.enable: 'true'
traefik.http.routers.app.rule: Host(`whoami.localhost`)
traefik.http.routers.app.entrypoints: websecure
traefik.http.routers.app.middlewares: corspreflight-middleware
traefik.http.middlewares.corspreflight-middleware.plugin.corspreflight.errorcode: 200
FAQs
Unknown package
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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.