Skip to content

Conversation

@ryanfb
Copy link
Contributor

@ryanfb ryanfb commented Apr 22, 2025

Fixes

Fixes #6769

Summary

Matomo 5 (released Dec 2023) changes how auth tokens work when using the reporting API: https://developer.matomo.org/changelog#usage-of-authentication-tokens

Anyone setting up a new auth token in Matomo 5 (e.g., to support Matomo analytics in a Hyrax app) will by default have it restricted to POST, which would make it not work with Hyrax.

Guidance for testing, such as acceptance criteria or new user interface behaviors:

  • Fresh Matomo 5 API tokens with POST restriction should now work

Type of change (for release notes)

  • notes-bugfix HTTP POST now used for Matomo API calls

Changes proposed in this pull request:

  • switch from GET to POST for all Matomo API calls

@samvera/hyrax-code-reviewers

@ryanfb
Copy link
Contributor Author

ryanfb commented Apr 22, 2025

NB: this is likely to start affecting all Hyrax users who use Matomo for statistics. We ran across this when an expired Matomo key for our Hyrax app stopped view/download statistics from displaying correctly, and the re-issued "secure" auth token being restricted to POST meant it needed this corresponding fix.

@github-actions
Copy link

github-actions bot commented Apr 22, 2025

Test Results

    1 files   -     12      1 suites   - 12   0s ⏱️ - 2h 39m 5s
1 743 tests  -  5 092  1 743 ✅  -  4 793  0 💤  - 299  0 ❌ ±0 
1 743 runs   - 16 362  1 743 ✅  - 15 882  0 💤  - 480  0 ❌ ±0 

Results for commit c922e22. ± Comparison against base commit f58d8e0.

♻️ This comment has been updated with latest results.

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.

Matomo 5 API calls should use POST instead of GET

1 participant