-
Notifications
You must be signed in to change notification settings - Fork 4
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
[SPIKE] Research prevention of mismatched api urls #2414
Comments
Sasha Dresden commented: So I did some research on this and there are several things I have found out.
It is possible to override this, but we don’t do so very often. Looking at our code base and the /api/docs/ the only place we are doing that is for the oidc calls. I’m not quite sure why we don’t have trailing slashes for them. Perhaps they prefer no trailing slash? Or just whoever set up these routes didn’t add them. But I tried making the mock_oidc calls with a trailing slash and they all work. I did not test with the non-mocked oidc calls, as that would require a push to dev, but I imagine it would behave the same.
The second option is a lot easier and less time consuming to implement and has lower risk now, whereas the first option will require a comprehensive sweep of the front end, so it’ll take a lot longer to implement but we could run into issues in the future if we choose to break the django default of always having a trailing slash. |
Sasha Dresden commented: Wanted to move this to Code Review but needed something for the PR field so I put the PR I put in for [https://fecgov.atlassian.net/browse/FECFILE-1785|https://fecgov.atlassian.net/browse/FECFILE-1785|smart-link] which implements the front-end interceptor to show how a demo of Option 2. As mentioned in the write-up, Option 1 would require a lot more time investment. |
Todd Lees commented: solution found and ticket created [https://fecgov.atlassian.net/browse/FECFILE-1877|https://fecgov.atlassian.net/browse/FECFILE-1877|smart-link] |
Shelly Wise commented: No code change or QA review needed on this ticket per DEV. Moved to Stage Ready. |
Identify potential solutions to avoid committing front end code that requests the api with urls that are correct except for missing a
/
at the end. These are easy to miss because the api redirects and the app behaves correctly. Consider automated solutions and change of process solutions.Upon review, follow up tickets will be made for any solutions we decide to act on.
QA Notes
null
DEV Notes
Note: time box to “2” points
Design
null
See full ticket and images here: FECFILE-1843
The text was updated successfully, but these errors were encountered: