Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-domain CSRF support? #5

Open
gouku opened this issue Feb 25, 2023 · 3 comments
Open

Cross-domain CSRF support? #5

gouku opened this issue Feb 25, 2023 · 3 comments

Comments

@gouku
Copy link

gouku commented Feb 25, 2023

First thanks for this project. I'd like to add a cross-domain CSRF support. My use case is: domain a.com sends requests to domain api.b.com. Both a.com and api.b.com are Next.js projects (two different projects in separate repo). Is it possible to use edge-csrf to implement it?

Thanks!

@amorey
Copy link
Member

amorey commented Feb 25, 2023

CSRF protection is designed to prevent cross-domain requests, not enable them so I don't think edge-csrf will be very helpful for your use case. To enable requests from a.com to api.b.com, you can implement CORS server-side at api.b.com.

@jspm2013
Copy link

First thanks for this project. I'd like to add a cross-domain CSRF support. My use case is: domain a.com sends requests to domain api.b.com. Both a.com and api.b.com are Next.js projects (two different projects in separate repo). Is it possible to use edge-csrf to implement it?

Thanks!

@gouku have you managed to do it, I had the same issue and wonder how you solved it? Thanks, Sebastian

@amorey
Copy link
Member

amorey commented Jul 31, 2024

Can you be more specific about your use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants