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

Rethink how post redirects work #8453

Open
gbp opened this issue Nov 12, 2024 · 0 comments
Open

Rethink how post redirects work #8453

gbp opened this issue Nov 12, 2024 · 0 comments
Labels
f:request-creation improvement Improves existing functionality (UI tweaks, refactoring, performance, etc)

Comments

@gbp
Copy link
Member

gbp commented Nov 12, 2024

The underlying cause of #4160 was the post redirect feature.

A PostRedirect instance is created after a logged out user composes a request, previews, and clicks "Send and publish request". This means if the user goes to /new?post_redirect=1 a duplicate request would be created - if not caught by InfoRequest.find_existing.

Perhaps we should rethink how post redirects work. Ideas:

  • Destroy post redirects once used
  • Remove post redirect token from session once used

Also which other website replicates POST requests after login, we should also consider:

  • Removing feature completely
  • Switching to GET redirects only

Both removing and switching to GET redirects would allow us to CRUDify the requests controller... currently we're limited and have to handle all new/preview/create states in the one new controller action. Ideally we would be able to split these up into CRUD actions but can't at present while retaining compatibility with the current post redirect feature.

@gbp gbp added f:request-creation improvement Improves existing functionality (UI tweaks, refactoring, performance, etc) labels Nov 12, 2024
@gbp gbp changed the title Rethink how post redirect work Rethink how post redirects work Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f:request-creation improvement Improves existing functionality (UI tweaks, refactoring, performance, etc)
Projects
None yet
Development

No branches or pull requests

1 participant