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

Custom hosts are matched against a very strict regex #56

Closed
ghost opened this issue Apr 6, 2018 · 4 comments · Fixed by #87
Closed

Custom hosts are matched against a very strict regex #56

ghost opened this issue Apr 6, 2018 · 4 comments · Fixed by #87

Comments

@ghost
Copy link

ghost commented Apr 6, 2018

In Contentful.js there is an option to specify a proxy host as described here: https://contentful.github.io/contentful.js/contentful/5.1.3/contentful.html#.createClient

However there is a test against this provided host in this repo here: https://github.com/contentful/contentful-sdk-core/blob/master/lib/create-http-client.js#L9

This regex does not match things like the following:

  • localhost
  • localhost:4444

This makes it very difficult to do testing against a locally running version of a proxy. Can this be changed to be a bit more lenient?

@axe312ger
Copy link
Contributor

Hey Soliah,

yeah we should make this possible, thank you for raising this ticket :)

I may have a look soon, any suggestions from your side what to transform the regex into?

Best,
Benedikt

@dpfavand
Copy link

Currently running into this issue as well. It looks like you would need to remove the requirement for a . between two strings (sub.domain), and make it optional.

@phoebeschmidt
Copy link
Contributor

hey @dpfavand, PRs are welcome! Sorry we haven't gotten to this sooner.

@ghost
Copy link

ghost commented Apr 3, 2020

🎉 This issue has been resolved in version 6.4.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ghost ghost added the released label Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants