Re:Go 1.8 Release Notes
by matt4077 on Thursday February 16, 2017 @02:18PM
(#13662713)
The code that does this for server-rendered js is in https://github.com/ReactTraining/react-router/blob/master/mo.... There's code to convert URL patterns to regular expressions in https://github.com/ReactTraining/react-router/blob/master/mo..., although that seems to work only for a single pattern and not all. Presumably you should find a way to convert all patterns to a single regex somewhere in the codebase and could use that to check the request in go.
[ Parent
| on HN ]
Hmmm, indeed. I didn't thought about using react server side rendering and intercepting it to check which status to provide. Good idea, thanks!
No, I'll have to think about whether it's worth it adding a whole SSR stack just for that, in my app behind auth :)