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

RHINENG-14704: Pass request as param instead of using cls #574

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marleystipich2
Copy link
Collaborator

@marleystipich2 marleystipich2 commented Dec 3, 2024

TW: The most terrifying PR.......

Ticket: https://issues.redhat.com/browse/RHINENG-14704

The purpose of this PR is to pass the request directly as a parameter instead of using continuation local storage.

Secure Coding Practices Checklist GitHub Link

- https://github.com/RedHatInsights/secure-coding-checklist

## Secure Coding Checklist
- [ ] Input Validation
- [ ] Output Encoding
- [ ] Authentication and Password Management
- [ ] Session Management
- [ ] Access Control
- [ ] Cryptographic Practices
- [ ] Error Handling and Logging
- [ ] Data Protection
- [ ] Communication Security
- [ ] System Configuration
- [ ] Database Security
- [ ] File Management
- [ ] Memory Management
- [ ] General Coding Practices

@marleystipich2 marleystipich2 force-pushed the RHINENG-4902 branch 3 times, most recently from edf41ee to 2e41b9f Compare December 4, 2024 15:59
@marleystipich2 marleystipich2 changed the title RHINENG-4902: Migrate Request to Axios RHINENG-14704: Migrate Request to Axios Dec 4, 2024
@marleystipich2 marleystipich2 changed the title RHINENG-14704: Migrate Request to Axios RHINENG-14704: Pass request as param instead of using cls Dec 4, 2024
Comment on lines +143 to +147

// How do we get the reqest here
module.exports = new Proxy (logger, {
get (target, key, receiver) {
const logger = getLogger();
get (target, key, receiver, req) {
const logger = getLogger(req);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to figure this out..... I don't thinkreq is not being passed correctly because I can't figure out where/how it's being called. I think somewhere in src/routes.js. Also, req is being used a lot in src/routes.js and I want to figure out exactly how that works and where it's getting req from...

@marleystipich2 marleystipich2 force-pushed the RHINENG-4902 branch 2 times, most recently from b923a7d to 0e4197a Compare December 10, 2024 05:51
@marleystipich2 marleystipich2 marked this pull request as ready for review December 10, 2024 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant