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

Make GET request logs filterable throught app's filter_parameters #7

Closed
wants to merge 1 commit into from

Conversation

agesnoui
Copy link

@agesnoui agesnoui commented Oct 1, 2024

Update GET request logging from string to hash to enable apps using this gem to filter out sensitive information in URIs.
The following log should evolve from:

INFO -- : GETTING: https://fhir-api.internal.staging.lifen.fr/fhir/Patient?_count=20&_sort=-
_lastUpdated&active:not=false&birthdate=1925-02-26&family:exact=aldrin&general-
practitioner=Organization/689802&given:exact=buzz

to:

INFO -- : "GETTING: {:scheme=>\"https\", :host=>\"fhir-api.internal.staging.lifen.fr\", :port=>nil,
:path=>\"/fhir/Patient\", :query=>{\"_count\"=>\"20\", \"_sort\"=>\"-_lastUpdated\",
\"active:not\"=>\"false\", \"birthdate\"=>\"1925-02-26\", \"family:exact\"=>\"aldrin\",
\"general-practitioner\"=>\"Practitioner/350035\", \"given:exact\"=>\"buzz\"}, :fragment=>nil}"

eventually enabling filtering the following way:

INFO -- : "GETTING: {:scheme=>\"https\", :host=>\"fhir-api.internal.staging.lifen.fr\", :port=>nil,
:path=>\"/fhir/Patient\", :query=>{\"_count\"=>\"20\", \"_sort\"=>\"-_lastUpdated\",
\"active:not\"=>\"false\", \"birthdate\"=>\"[FILTERED]\", \"family:exact\"=>\"[FILTERED]\",
\"general-practitioner\"=>\"Practitioner/350035\", \"given:exact\"=>\"[FILTERED]\"}, :fragment=>nil}"

@agesnoui agesnoui closed this Oct 1, 2024
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.

1 participant