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

add a way to update the session cookie after every successful request #7

Open
cdepillabout opened this issue Jul 3, 2018 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@cdepillabout
Copy link
Member

Ideally, the _GG_SESSION cookie would have its max-age updated after every successful request. This would make sure a user would never have to log back in as long as they were using the upstream application regularly.

Unfortunately, the library we are using to proxy http requests (http-reverse-proxy) doesn't provide any easy way to modify a response.

Right now, the datatype defining how to handle a request is defined like the following:

data WaiProxyResponse = WPRResponse WAI.Response
                        -- ^ Respond with the given WAI Response.
                        --
                        -- Since 0.2.0
                      | WPRProxyDest ProxyDest
                        -- ^ Send to the given destination.
                        --
                        -- Since 0.2.0
                      | WPRProxyDestSecure ProxyDest
                        -- ^ Send to the given destination via HTTPS.
                      | WPRModifiedRequest WAI.Request ProxyDest
                        -- ^ Send to the given destination, but use the given
                        -- modified Request for computing the reverse-proxied
                        -- request. This can be useful for reverse proxying to
                        -- a different path than the one specified. By the
                        -- user.
                        --
                        -- Since 0.2.0
                      | WPRModifiedRequestSecure WAI.Request ProxyDest
                        -- ^ Same as WPRModifiedRequest but send to the
                        -- given destination via HTTPS.
                      | WPRApplication WAI.Application
                        -- ^ Respond with the given WAI Application.

Ideally, this would be changed so that WPRModifiedRequest also took a function for changing the response:

...
| WPRModifiedRequest Request ProxyDest (Response -> Reponse)
...
@cdepillabout cdepillabout added enhancement New feature or request help wanted Extra attention is needed labels Jul 3, 2018
@cdepillabout cdepillabout added this to the MVP milestone Jul 3, 2018
@cdepillabout
Copy link
Member Author

This issue will require updating the http-reverse-proxy library, so it might take longer than the other issues. This issue should probably be addresses before the other issues in the same milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant