Comments (2)
Are you setting the Origin
header?
curl -v -o /dev/null http://localhost:8000/v1/storage/files/55af1e60-0f28-454e-885e-ea6aab2bb288 \
-H "Origin: https://www.example.com" \
-H "$AUTH"
> GET /v1/storage/files/55af1e60-0f28-454e-885e-ea6aab2bb288 HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/7.79.1
> Accept: */*
> Origin: https://www.example.com
> Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NTIzNDMyNjgsImh0dHBzOi8vaGFzdXJhLmlvL2p3dC9jbGFpbXMiOnsieC1oYXN1cmEtYWxsb3dlZC1yb2xlcyI6WyJhZG1pbiJdLCJ4LWhhc3VyYS1kZWZhdWx0LXJvbGUiOiJhZG1pbiIsIngtaGFzdXJhLXVzZXItaWQiOiJhYjViYTU4ZS05MzJhLTQwZGMtODdlOC03MzM5OTg3OTRlYzIiLCJ4LWhhc3VyYS11c2VyLWlzQW5vbnltb3VzIjoiZmFsc2UifSwiaWF0IjoxNjUyMzQyMzY4LCJpc3MiOiJoYXN1cmEtYXV0aCIsInN1YiI6ImFiNWJhNThlLTkzMmEtNDBkYy04N2U4LTczMzk5ODc5NGVjMiJ9.T4fPzD8dInw4TvsaiLu2dDsdp1PpeC-BwLjFjuaw3kc
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Access-Control-Allow-Origin: *
< Access-Control-Expose-Headers: Content-Length,Content-Type,Cache-Control,Etag,Last-Modified,X-Error
< Cache-Control: max-age=3600
< Content-Disposition: inline; filename="logo.jpg"
< Content-Length: 33399
< Content-Type: image/jpeg
< Etag: "78b676e65ebc31f0bb1f2f0d05098572"
< Last-Modified: Thu, 12 May 2022 07:59:30 +0000
< Surrogate-Key: 55af1e60-0f28-454e-885e-ea6aab2bb288
< Date: Thu, 12 May 2022 07:59:31 GMT
I suspect you may be missing it, as you can see from my example above Access Control headers are returned correctly (but only if Origin
header is present in the request).
You can read more about it here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
from hasura-storage.
I see that too!
Works as expected locally. Thanks buddy 🙏
Honestly, I've loved getting up and running with nhost. Everything just works! When something doesn't, it's usually some simple config change. You're smart folks.
from hasura-storage.
Related Issues (20)
- Manual migrations HOT 7
- How to handle secret injection HOT 9
- Support max_upload_file_size > 50mb default HOT 10
- How to upload file using <input type=file />? HOT 1
- Add X-Hasura-Role in CORS headers HOT 1
- Storage.files table should have a metadata column (like auth.users) HOT 5
- Storage.buckets table should be enum HOT 4
- Image transformation (quality) does not seem to work properly HOT 4
- Allow admin role to create pre-signed URLs with arbitrary expirations HOT 2
- Documentation for using hasura-storage outside of nhost
- Compatibility with Hasura graphql-default naming convention HOT 1
- openapi docs: /presignedurl, not /presigned HOT 1
- Generate multiple presigned urls from a single request HOT 2
- investigate potential memory leak with image manipulation HOT 1
- Upgrading to v0.4.0 causes application panic HOT 3
- Forwarding Content-Length and Content-Type breaks upload flow HOT 1
- Migartions database name should be configurable HOT 2
- v0.5.0 - s3-endpoint breaking change HOT 3
- Image orientation metadata lost when transformations applied HOT 3
- Service unable to restart after crashing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hasura-storage.