Skip to content

Add a CORS header to the mock-api#124

Merged
lleadbet merged 3 commits intotwitchdev:mainfrom
moondrek:main
Dec 6, 2021
Merged

Add a CORS header to the mock-api#124
lleadbet merged 3 commits intotwitchdev:mainfrom
moondrek:main

Conversation

@moondrek
Copy link
Copy Markdown
Contributor

@moondrek moondrek commented Dec 3, 2021

Problem/Feature

The mock-api is a great tool for building against partner- or affiliate-specific endpoints. The absence of CORS headers causes browsers to reject AJAX requests to the mock-api by default.

Description of Changes:

  • Add a Access-Control-Allow-Origin: * header, same as the helix endpoint

Checklist

  • My code follows the Contribution Guide
  • I have self-reviewed the changes being requested
  • I have made comments on pieces of code that may be difficult to understand for other editors
  • I have updated the documentation (if applicable)

@lleadbet lleadbet self-requested a review December 3, 2021 18:39
Comment thread internal/mock_api/mock_server/server.go Outdated
@lleadbet lleadbet self-requested a review December 6, 2021 23:01
@lleadbet lleadbet merged commit 1879e15 into twitchdev:main Dec 6, 2021
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