-
Notifications
You must be signed in to change notification settings - Fork 2.8k
server: support custom URI schemes in CORS config (fix #5818) #5940
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
Conversation
|
Beep boop! 🤖 Hey @LilRed, thanks for your PR! One of my human friends will review this PR and get back to you as soon as possible. Stay awesome! 😎 |
|
Note from conversation with Auke: Do we want to modify this to restrict it to only spec-compliant URL schemes? https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Definition
Tl;dr URL scheme = any combination of alphanumeric or |
|
I'd be happy to make this change if required, however I would need to set up Hasura server development on my machine. I saw CONTRIBUTING.md, which is helpful. Do you recommend any text editor/plugin combination? |
|
@LilRed Yes, that guide is certainly valuable. In particular, I'd advise you to follow the suggestion to use ghcup to install the correct GHC+cabal versions. And do follow the instructions precisely. In particular it's important to compile the console correctly if you want to test your work. (The Haskell side can be built independently, however a full development environment would also include a working console.) Editors are, of course, a rather personal choice. Many Haskell developers use emacs. But I'd only recommend that for this project if you are already familiar with that - it's a big beast to learn to use. Visual Studio Code also has a number of packages that make it into an excellent Haskell editor, and offers a perhaps more welcoming experience. |
|
Hello @LilRed! Thanks so much for your contribution to Hasura OSS during the Hacktoberfest 2020! We'd love to send you some Hasura swag as a token of appreciation and you will be getting an email with the swag form shortly. ✨ |
|
what is needed to get this one forward? |
|
I haven't yet found the time to do this, things have gotten crazy at work. It's still on my personal backlog but consider it up for grabs. |
|
Deploy preview for hasura-docs ready! Built with commit d1ee51f |
|
The CI is behaving weirdly, which may be because this is an old PR. I'll close and reopen it. |
|
Beep boop! 🤖 Awesome work @LilRed! Your changes were merged successfully. All of us at Hasura ❤️ what you did. Thanks again 🤗 |
Description
Enables the use of Hasura server with custom URI schemes, necessary for e.g. Capacitor.
Changelog
CHANGELOG.mdis updated with user-facing content relevant to this PR. If no changelog is required, then add theno-changelog-requiredlabel.Affected components
Related Issues
#5818
Solution and Design
Accept any non-empty string not containing a colon as a scheme name.
Steps to test and verify
Configure CORS config with an entry starting in e.g.
capacitor://.Limitations, known bugs & workarounds
This probably gives an atrocious error message if the user forgets the colon in the scheme separator.
Server checklist
Catalog upgrade
Does this PR change Hasura Catalog version?
Metadata
Does this PR add a new Metadata feature?
run_sqlauto manages the new metadata through schema diffing?run_sqlauto manages the definitions of metadata on renaming?export_metadata/replace_metadatasupports the new metadata added?GraphQL
Breaking changes
No Breaking changes
There are breaking changes:
Metadata API
Existing
querytypes:argspayload which is not backward compatibleJSONschemaGraphQL API
Schema Generation:
NamedTypeSchema Resolve:-
nullvalue for any input fieldsLogging
JSONschema has changedtypenames have changed