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

hotfix: use http get instead of head to check reachable url #64

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# go-utils

<a name="v1.39.3"></a>
## [v1.39.3] - 2024-07-29
### Fixes
- use http get instead of head to check reachable url


<a name="v1.39.2"></a>
## [v1.39.2] - 2024-07-09
### Other Improvements
- fix vulnerabilities in go.mod
- fix vulnerabilities in go.mod ([#63](https://github.com/kumparan/go-utils/issues/63))


<a name="v1.39.1"></a>
Expand Down Expand Up @@ -156,9 +162,6 @@

<a name="v1.20.0"></a>
## [v1.20.0] - 2022-03-11

<a name="v.1.20.0"></a>
## [v.1.20.0] - 2022-03-11
### New Features
- add constraint size gql directive ([#30](https://github.com/kumparan/go-utils/issues/30))

Expand Down Expand Up @@ -256,11 +259,11 @@
- add money formatter for multiple currencies ([#13](https://github.com/kumparan/go-utils/issues/13))


<a name="v1.8.0"></a>
## [v1.8.0] - 2020-12-10

<a name="v1.7.1"></a>
## [v1.7.1] - 2020-12-10

<a name="v1.8.0"></a>
## [v1.8.0] - 2020-12-10
### New Features
- add formatter for indonesian money and date

Expand Down Expand Up @@ -325,7 +328,8 @@
- init go-utils


[Unreleased]: https://github.com/kumparan/go-utils/compare/v1.39.2...HEAD
[Unreleased]: https://github.com/kumparan/go-utils/compare/v1.39.3...HEAD
[v1.39.3]: https://github.com/kumparan/go-utils/compare/v1.39.2...v1.39.3
[v1.39.2]: https://github.com/kumparan/go-utils/compare/v1.39.1...v1.39.2
[v1.39.1]: https://github.com/kumparan/go-utils/compare/v1.39.0...v1.39.1
[v1.39.0]: https://github.com/kumparan/go-utils/compare/v1.38.0...v1.39.0
Expand All @@ -351,8 +355,7 @@
[v1.22.0]: https://github.com/kumparan/go-utils/compare/v1.21.0...v1.22.0
[v1.21.0]: https://github.com/kumparan/go-utils/compare/v1.20.1...v1.21.0
[v1.20.1]: https://github.com/kumparan/go-utils/compare/v1.20.0...v1.20.1
[v1.20.0]: https://github.com/kumparan/go-utils/compare/v.1.20.0...v1.20.0
[v.1.20.0]: https://github.com/kumparan/go-utils/compare/v1.19.3...v.1.20.0
[v1.20.0]: https://github.com/kumparan/go-utils/compare/v1.19.3...v1.20.0
[v1.19.3]: https://github.com/kumparan/go-utils/compare/v1.19.2...v1.19.3
[v1.19.2]: https://github.com/kumparan/go-utils/compare/v1.19.1...v1.19.2
[v1.19.1]: https://github.com/kumparan/go-utils/compare/v1.19.0...v1.19.1
Expand All @@ -368,9 +371,9 @@
[v1.12.0]: https://github.com/kumparan/go-utils/compare/v1.11.0...v1.12.0
[v1.11.0]: https://github.com/kumparan/go-utils/compare/v1.10.0...v1.11.0
[v1.10.0]: https://github.com/kumparan/go-utils/compare/v1.9.0...v1.10.0
[v1.9.0]: https://github.com/kumparan/go-utils/compare/v1.8.0...v1.9.0
[v1.8.0]: https://github.com/kumparan/go-utils/compare/v1.7.1...v1.8.0
[v1.7.1]: https://github.com/kumparan/go-utils/compare/v1.7.0...v1.7.1
[v1.9.0]: https://github.com/kumparan/go-utils/compare/v1.7.1...v1.9.0
[v1.7.1]: https://github.com/kumparan/go-utils/compare/v1.8.0...v1.7.1
[v1.8.0]: https://github.com/kumparan/go-utils/compare/v1.7.0...v1.8.0
[v1.7.0]: https://github.com/kumparan/go-utils/compare/v1.6.0...v1.7.0
[v1.6.0]: https://github.com/kumparan/go-utils/compare/v1.5.0...v1.6.0
[v1.5.0]: https://github.com/kumparan/go-utils/compare/v1.4.0...v1.5.0
Expand Down
2 changes: 1 addition & 1 deletion url.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func JoinURL(baseURL string, pathElements ...string) (string, error) {

// IsURLReachable check is the url reachable
func IsURLReachable(url string) bool {
res, err := http.Head(url) //nolint:gosec
res, err := http.Get(url) //nolint:gosec
if err != nil {
log.WithField("url", url).Error(err)
return false
Expand Down
Loading