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

Interceptor #2042

Merged
merged 6 commits into from
Aug 18, 2023
Merged

Interceptor #2042

merged 6 commits into from
Aug 18, 2023

Conversation

amontenegro
Copy link
Member

No description provided.

});
}

console.log("-------------------------------------------------------------------------------------")
Copy link
Member

Choose a reason for hiding this comment

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

Should this logs be remove?

var method = req.method
var urlWithParams = req.urlWithParams
// If the request contains a content type, be sure to set the encoding to utf-8
if(['POST', 'PUT'].includes(method)) {
Copy link
Member

Choose a reason for hiding this comment

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

We might need to add PATCH in the future.
NO a change we need right now

// If the request contains a content type, be sure to set the encoding to utf-8
if(['POST', 'PUT'].includes(method)) {
var clonedRequest;
if(urlWithParams == '/signin/auth.json') {
Copy link
Member

@leomendoza123 leomendoza123 Aug 18, 2023

Choose a reason for hiding this comment

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

this header excepcion seems to be require for userStatus.json?logUserOut=true, sendReactivation.json, social/signin/auth.json, shibboleth/signin/auth.json, signin/auth.json (all the urls called on SignInService)

Maybe we can declare a class level atribute like

const formUrlEcondedUrls = ["userStatus.json?logUserOut=true", "sendReactivation.json", "social/signin/auth.json", "shibboleth/signin/auth.json", "signin/auth.json"];

And check if a route is in the array

if(formUrlEcondedUrls.includes(urlWithParams)) {

@leomendoza123 leomendoza123 merged commit 365264d into main Aug 18, 2023
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.

2 participants