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

fix: Handle CORS for OS proxy endpoints #2677

Merged
merged 1 commit into from
Jan 19, 2024
Merged

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Jan 18, 2024

What does this PR do?

  • Fix OS proxy endpoints to allow correct list of origins defined in MAP_ALLOWLIST
  • Pull this function out of the proxy, and place it into a middleware layer

To test

Copy link

github-actions bot commented Jan 18, 2024

Removed vultr server and associated DNS entries

@DafyddLlyr DafyddLlyr marked this pull request as draft January 18, 2024 12:46
@DafyddLlyr DafyddLlyr force-pushed the dp/osproxy-cors-headers branch 2 times, most recently from 9566ade to 4ce732f Compare January 18, 2024 16:20
@DafyddLlyr DafyddLlyr force-pushed the dp/osproxy-cors-headers branch from 4ce732f to 4f77ffa Compare January 18, 2024 16:32
@DafyddLlyr DafyddLlyr marked this pull request as ready for review January 18, 2024 16:34
@DafyddLlyr DafyddLlyr requested a review from a team January 18, 2024 16:34
@Mike-Heneghan
Copy link
Contributor

What does this PR do?

  • Fix OS proxy endpoints to allow correct list of origins defined in MAP_ALLOWLIST
  • Pull this function out of the proxy, and place it into a middleware layer

To test

  • Works localhost → localhost
  • Works localhost → Pizza
  • Works from oslmap.netlify.app → Staging
  • Works from <PR_NUMBER>--oslmap.netlify.app → Staging

Hey @DafyddLlyr 👋

I'm keen to test and have a look at this PR although I'm struggling a little to figure out the oslmap steps 🤔

Would you be able to add a little more context or maybe point me at some info which might put me on the right path?

Copy link
Contributor

@Mike-Heneghan Mike-Heneghan left a comment

Choose a reason for hiding this comment

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

The code change here seems like a really good solution.

Although I'm not confident about ✅ as I haven't tested this.

Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

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

Working for me - thanks for helping troubleshoot this one!

@Mike-Heneghan testing instructions found in description of this first-attempt PR #2672

@DafyddLlyr DafyddLlyr merged commit 2b700f6 into main Jan 19, 2024
12 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/osproxy-cors-headers branch January 19, 2024 11:22
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.

3 participants