Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
pxy-redirect-ow-function
Experimental open whisk function for deployment on DigitalOceans function platform
-
til
Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as an open source contributor and product manager (by jonasbn)
The serverless functions with Digital Ocean are based on Apache Open Whisk, so the service has additional name space, which need to go into the URL.
Where the target URL uses a fragment resembling e.g.: #wall the short version used a form mimicking a path, like so: // e.g. /13/all. Where the end results is translates the last part of the URL (back) into a fragment. By "back" I mean that the URLs I used are actually parsed from the original URLs including fragement and translated into a format that was transportable, see: clang diagnostic flags matrix generator.
A funny thing about the URL of the service, https://pxy.fi/p/r/13/all (example), was that I could lift the code from the service implementation, since the root was not where I expected it to be: https://pxy.fi/, but actually here: https://pxy.fi/p/r/
The complete implementation is available on GitHub and the function can be seen in service from:
My TIL collection: clang/diagnostic_flags
function main() { return { headers: { location: 'http://openwhisk.org' }, statusCode: 302 } }