Skip to content

Conversation

@wojciak
Copy link

@wojciak wojciak commented Nov 25, 2024

  • This PR adds the ability to provide a response header filter when recording a mocketized request.
  • The reasoning for this feature is to allow implementers to specify non-safe headers (like authorization tokens etc) and to be able to safely commit the recordings into their projects.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarQube Cloud

@coveralls
Copy link

Coverage Status

coverage: 98.424% (-0.8%) from 99.255%
when pulling 1f703d5 on e-z-health:feature/recording-ignored-headers
into 0da2722 on mindflayer:main.

@mindflayer
Copy link
Owner

Same problem here, you are adding code that deals with the HTTP protocol in Mocket core.

@wojciak
Copy link
Author

wojciak commented Nov 25, 2024

@mindflayer Got it, the question is then: is there any plan to realise items like this as plugins / specific injectors in the future? Unfortunately the recording feature is vowed into the core directly, so this is the best approach I've came up with.

@mindflayer
Copy link
Owner

mindflayer commented Nov 26, 2024

Unfortunately the recording feature is vowed into the core directly, so this is the best approach I've came up with.

This is about to change: see #274

We will offer a way to simply specify a _storage_class different from the default one. So, you'll just have to inherit from it and make it act the way you need you want.

@wojciak
Copy link
Author

wojciak commented Nov 26, 2024

@mindflayer awesome, closing this PR then

@wojciak wojciak closed this Nov 26, 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.

3 participants