Skip to content

LinkoraApp/proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linkora Web needs this proxy to bypass browser CORS restrictions to scrape link metadata (title, description, image) and display images. While built specifically for the web client, the Android and desktop apps can also optionally relay requests through it.

A default public instance is hosted on Render, but you can easily self-host it using a standalone binary from the Releases or spinning it up via Docker. The official Docker image supports both amd64 and arm64.

Endpoints

There are two endpoints (both are GET):

  1. /metadata: Retrieves the OpenGraph information from any site. The site URL must be provided in an encoded query parameter named url.
  2. /image: Sends back the raw bytes of the image from the provided url query parameter.
    • This is intended to bypass the restrictions of the browser and the origin server to display images on the Linkora web app.

Both accept an optional boolean query parameter force_use_env_us. When set to true, it forces the server to use the user-agent value from the local environment (or a fallback value). If set to false, it is basically useless. By default, the proxy just passes along the exact User-Agent header that the client sent it, meaning the user-agent provided by the client actually matters here.

Configuration

You can tweak the server behavior using the following environment variables:

Environment Variable Default Value
LINKORA_PROXY_PORT 64352
LINKORA_PROXY_USER_AGENT Mozilla/5.0 (compatible; LinkoraProxy/1.0)

Community

Discord


License: AGPLv3

About

A lightweight metadata and image CORS proxy for Linkora.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors