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

Add CORS to /questions/$ #305

Merged
merged 1 commit into from
Aug 24, 2023
Merged

Add CORS to /questions/$ #305

merged 1 commit into from
Aug 24, 2023

Conversation

mruwnik
Copy link
Collaborator

@mruwnik mruwnik commented Aug 23, 2023

The chatbot is playing about at proxying this, when it could just directly call it

type Handler = (args: LoaderArgs) => any
export const wrapCORS = (fn: Handler) => async (args: LoaderArgs) => {
if (args.request.method == 'OPTIONS') {
return CORSOptions(args.request)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is any of this special to cloudflare or remix? if yes, a link to relevant documentation would be nice ... if not, if all just standard HTTP server response stuff 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no. This is to get the chat bot working, which uses remix. This is all bog standard http stuff

@mruwnik mruwnik merged commit 402807c into master Aug 24, 2023
1 check passed
@mruwnik mruwnik deleted the cors branch August 24, 2023 14:47
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

Successfully merging this pull request may close these issues.

2 participants