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

Support disabling compile time http request #15

Merged

Conversation

s3cur3
Copy link
Contributor

@s3cur3 s3cur3 commented Dec 6, 2022

Hi there! Thanks so much for your work on this library—it's saved us a ton of time on our project. ☺️

This PR adds a new configuration flag, :fetch_latest, which entirely disables the HTTP request at compile-time that fetches the latest public_suffix_list.dat. This behavior was (sort of) achievable without this flag, by configuring the :public_suffix_list_url to the empty charlist, but doing so produced a warning on each compile. With the new flag, there's no error.

This is desirable for our use-case for a couple reasons:

  1. We want the development build to match as closely as possible what we'll deploy in prod
  2. We don't want the possibility of failing production builds based on the availability of a third-party web host

Resolves #4

This adds a new configuration flag, `:fetch_latest`, which entirely disables the HTTP request at compile-time that tries to get the latest `public_suffix_list.dat`. This behavior was (sort of) achievable without this flag, by configuring the `:public_suffix_list_url` to the empty charlist, but doing so produced a warning on each compile. With the new flag, there's no error.

This is desirable for our use-case for a couple reasons:

1. We want the development build to match as closely as possible what we'll deploy in prod
2. We don't want the possibility of failing production builds based on the availability of a third-party web host
@Zensavona
Copy link
Owner

Hi, thanks so much for your excellent PR! I'll cut a new release today.

@Zensavona Zensavona merged commit b809186 into Zensavona:master Dec 8, 2022
@Zensavona
Copy link
Owner

@s3cur3
Copy link
Contributor Author

s3cur3 commented Dec 8, 2022

Sweet, thank you so much! 😄

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.

Provide a way to disable fetching a fresh public suffix list on compile
2 participants