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

Allow origin academix.sefglobal.org in academix API #125

Open
Piumal1999 opened this issue Apr 7, 2023 · 1 comment
Open

Allow origin academix.sefglobal.org in academix API #125

Piumal1999 opened this issue Apr 7, 2023 · 1 comment
Assignees

Comments

@Piumal1999
Copy link
Member

Is your feature request related to a problem? Please describe.
We need to allow the origin academix.sefglobal.org in academix API

Describe the solution you'd like
Allow the origin

Describe alternatives you've considered
N/A

Additional context
N/A

@Michila0
Copy link

Michila0 commented Dec 8, 2023

  1. Access Control Allow Origin Header:

    • Set the Access-Control-Allow-Origin header to academix.sefglobal.org in the HTTP response of your API. This header indicates which origins are permitted to access the resource. For example:
      Access-Control-Allow-Origin: https://academix.sefglobal.org
      
  2. Wildcard for Any Origin (Optional):

    • If you want to allow any origin to access the API, you can use a wildcard (*) instead:
      Access-Control-Allow-Origin: *
      
    • However, for security reasons, it's generally better to specify the exact origins that are allowed.
  3. Other CORS Headers:

    • Depending on your requirements, you may need to set other CORS headers, such as Access-Control-Allow-Methods and Access-Control-Allow-Headers, to define which HTTP methods and headers are allowed.
  4. Server-Side Configuration:

    • Ensure that your server is configured to handle CORS. This might involve modifying server settings or using middleware that adds the necessary headers.
  5. Testing:

    • After making these changes, thoroughly test the API with requests originating from academix.sefglobal.org to ensure that CORS is configured correctly.
  6. Documentation:

    • Update your API documentation to reflect the allowed origins, methods, and headers.

Remember, the exact steps can vary based on the technology stack you're using (Node.js, Django, Flask, etc.), so refer to the documentation for your specific server or framework.

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

2 participants