Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
/ farspark Public archive
forked from imgproxy/imgproxy

INACTIVE - Server for runtime conversion of media into Hubs-friendly formats.

Notifications You must be signed in to change notification settings

MozillaReality/farspark

 
 

Repository files navigation

farspark

farspark is a fast and secure standalone server, based on imgproxy, for transforming and proxying remote media. farspark is used with hubs in order to proxy and convert shared media assets such as images, videos, PDF files, and GLTF assets.

Installation

  1. Install farspark dependencies:
sudo apt install libgs-dev
  1. Next, install farspark itself:
$ go get -f -u github.com/MozillaReality/farspark

Habitat

Farspark publishes a Habitat plan for its installation, and is the method we use to deploy farspark for Hubs.

Configuration

Farspark supports a number of imgproxy configuration options, plus:

  • FARSPARK_ALLOW_ORIGINS - when set, enables CORS headers with provided list of comma-separated origins. CORS headers are disabled by default.
  • FARSPARK_SERVER_URL - The URL of this server; used for rewriting URLs for asset subresources, i.e. in GLTFs.
  • FARSPARK_CACHE_ROOT - Root folder for filesystem cache used to speed up frame/page extraction across requests
  • FARSPARK_CACHE_SIZE - Size (in bytes) for the filesystem cache

Processing methods

In place of imgproxy's resizing types, Farspark supports:

  • extract — does not perform any image transformations, but extracts a single page or frame from an indexable media as an image (right now PDFs are supported.)
  • raw — proxies through a version of the media transformed appropriately for Hubs to use. Note that when raw is specified, you can also perform an HTTP HEAD request to just fetch the remote HTTP headers.

Index

If the media being requested has multiple pages or frames, you can request to render a specific one. The page/frame index starts at zero, and media which supports index selection will include an X-Max-Content-Index header to indicate the maximum index that can be requested. Right now only supported for PDFs.

License

imgproxy and farspark are both licensed under the MIT license.

About

INACTIVE - Server for runtime conversion of media into Hubs-friendly formats.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 90.3%
  • Shell 5.5%
  • Python 4.2%