Git Product home page Git Product logo

gxy.io's Introduction

gxy.io link shortening

This repository is for Galaxy Project members to create gxy.io short links that redirect to other URLs, e.g. for publications, conference slides, etc.

Usage

  1. Add your link to gxy_io_rewrites in group_vars/all.yaml.

    The value of src is the path (after gxy.io) of the short link you would like to create. It should start with a / and supports regular expressions; the path component of a gxy.io request is checked with re.match(src, path).

    The value of dest is the URL to redirect to.

    The tests key is optional unless the src is a regular expression. This should contain a list of paths to test that the rewrite function appropriately rewrites paths matching your src to your dest. If unset, it defaults to the value of src.

  2. Make a Pull Request with your changes. A test will make sure your syntax passes. Once your PR is approved and merged, the changes are automatically deployed.

Notes

Rewrites are performed via an AWS Lambda@Edge function via CloudFront. The function runs under the Python 3.9 runtime.

The initial gxy.io service (pre-automation) ran via nginx on an EC2 instance, so some work was done to support automated deployment under nginx, which is preserved in the nginx directory in case it would be useful in the future.

Backreferences from src are not supported (there has been no need thus far), but could be implemented fairly easily in the Lambda function, if someone wanted it.

gxy.io's People

Contributors

natefoo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

natefoo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.