3 ms·
Something I really like about Mastodon in general is that every instance by default serves open CORS headers: access-control-allow-origin: * access-con
by simonw 3y ago
Something I really like about Mastodon in general is that every instance by default serves open CORS headers:
access-control-allow-origin: *
access-control-allow-methods: POST, PUT, DELETE, GET, PATCH, OPTIONS
access-control-expose-headers: Link, X-RateLimit-Reset, X-RateLimit-Limit, X-RateLimit-Remaining, X-Request-Id
access-control-max-age: 7200
This has lead to a delightful variety of custom clients like https://phanpy.social/ https://phanpy.social/ - https://elk.zone/ https://elk.zone/ is another example that I really like.
It's the complete opposite of the Twitter API situation, where they locked their API down and killed the entire ecosystem of third-party clients.
- gunapologist99 3y agoIt's an interesting feature, but remember that CORS exists for a reason; this can also lead to a delightful variety of custom CSRF attacks etc. ;)
- simonw 3y agoCan it though? I've been trying to figure out some security problems that are a result of this CORS policy - as I'm considering it for my own application - and I can't figure out how an attack could actually work. The API I'm working with uses Authorization: Bearer tokens, and only allows incoming requests with a valid API token.