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

CORS does not allow to get the object's headers #231

Open
mike-petrov opened this issue Dec 11, 2024 · 4 comments
Open

CORS does not allow to get the object's headers #231

mike-petrov opened this issue Dec 11, 2024 · 4 comments
Assignees
Labels
bug Something isn't working I4 No visible changes S4 Routine U2 Seriously planned

Comments

@mike-petrov
Copy link
Contributor

Current Behavior

CORS does not allow to get the object's headers

Object shared link (/getobject):

  • with cors:
image
  • without cors:
image
@mike-petrov mike-petrov added U2 Seriously planned bug Something isn't working labels Dec 11, 2024
@mike-petrov mike-petrov self-assigned this Dec 11, 2024
@roman-khimov roman-khimov added S4 Routine I4 No visible changes labels Dec 11, 2024
@mike-petrov
Copy link
Contributor Author

Only standard headers can be read from another domain, in our case we can't get custom object headers because of cors: https://web.dev/articles/introduction-to-fetch#response_types, but we can specify Access-Control-Allow-Origin parameter in backend for domain panel.fs.neo.org, @roman-khimov is this possible?

@roman-khimov
Copy link
Member

I'm not excited about this idea. This REST gateway is supposed to be app-agnostic, not configured or even used for any specific application.

@mike-petrov
Copy link
Contributor Author

mike-petrov commented Dec 12, 2024

Yes, I absolutely agree, but I had no other solutions. But today I thought that we can do the same as in send-fs-neo-org, that is through nginx to proxy the call to rest and this way we will get rid of cors and will address within the same domain:

This method works for send-fs-neo-org.

@roman-khimov
Copy link
Member

That was my thought as well, but this breaks the simplicity of panel.fs.neo.org somewhat, it was using REST as is and it's mostly fine this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working I4 No visible changes S4 Routine U2 Seriously planned
Projects
None yet
Development

No branches or pull requests

2 participants