mirror of
https://github.com/nspcc-dev/panel-fs-neo-org.git
synced 2026-03-01 04:29:25 +00:00
CORS does not allow to get the object's headers #121
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mike-petrov on GitHub (Dec 11, 2024).
Originally assigned to: @532910 on GitHub.
Current Behavior
CORSdoes not allow to get the object's headersObject shared link (
/getobject):with cors:

without cors:

@mike-petrov commented on GitHub (Dec 11, 2024):
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-Originparameter in backend for domain panel.fs.neo.org, @roman-khimov is this possible?@roman-khimov commented on GitHub (Dec 11, 2024):
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 commented on GitHub (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 commented on GitHub (Dec 12, 2024):
That was my thought as well, but this breaks the simplicity of
panel.fs.neo.orgsomewhat, it was using REST as is and it's mostly fine this way.@roman-khimov commented on GitHub (Jan 3, 2025):
Can
Access-Control-Expose-Headershelp us?@mike-petrov commented on GitHub (Jan 13, 2025):
Looks like something that should solve our problem, I've never seen it, maybe @532910 knows?
@mike-petrov commented on GitHub (Jul 23, 2025):
added
Access-Control-Expose-Headersby @532910