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

Support CORS policy for requests #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

yita0101
Copy link

@yita0101 yita0101 commented Nov 2, 2024

Because websites need to be separated from the front end, cross-domain access requests are required.
After the merge, pelease redistribute a version and redeploy it.
Thank you.
image

@yita0101
Copy link
Author

yita0101 commented Nov 3, 2024

I have developed hacd.fun, welcome to visit.

@jojoin
Copy link
Member

jojoin commented Nov 3, 2024

There are multiple considerations here:

  1. Adding a generic Header will increase the load on network requests, especially if Hacash is used as a large-scale data service in the future.
  2. some third-party services may not want their back-end data to be called by other front-ends (e.g. to save on traffic charges).
  3. If you need your own node service to be cross-domain, you can add any desired Header via the Nginx proxy.
    The preference here is to keep the CORS policy unadded, is there more to consider?

@yita0101
Copy link
Author

yita0101 commented Nov 3, 2024

I think proxy requests consume extra traffic, which is unnecessary.
Later, I consider loading this item through the configuration file.

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

Successfully merging this pull request may close these issues.

2 participants