Skip to main content

Lofor is a lightweight development server which acts as a reverse proxy to solve your cors problems.

Project description

Lofor - A reverse proxy for development

Lofor is a lightweight development server which acts as reverse proxy to solve your cors header problems.

CORS is a common problem faced when developing frontend and backend separated projects.

During development, you may like to use a backend in localhost:7777/api/ and frontend in localhost:7777.

This becomes more complex when you use two different frameworks for backend and frontend.

How lofor solves the problem?

In lofor, you can map multiple hosts to single one.

Installation

pip install lofor

Forward command

lofor forward / http://localhost:5173 # Mapping to svelte dev server
lofor forward /api/ https://localhost:8000   # Mapping to django's dev server

# More examples
lofor forward api.localhost /api/ https://localhost:8000
lofor forward localhost http://localhost:3000

# You can also map to any real server
# lofor forward / https://example.com

Start lofor server

The server will be listening at http://localhost:7777

lofor start

To list lofor forwards

lofor list

Remove lofor forwards

lofor remove /api/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lofor-0.0.2.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

lofor-0.0.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file lofor-0.0.2.tar.gz.

File metadata

  • Download URL: lofor-0.0.2.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for lofor-0.0.2.tar.gz
Algorithm Hash digest
SHA256 618c49685fa006c8fc4cc465cafca31d8987c976904abfba1a5ba903d8a7519e
MD5 3c0225ae8a0bf30d4eb063dc47389b70
BLAKE2b-256 cb58bd89355387e9c6ef1bc8492a10a378cff5a3fd07e0841d7816dab23d85b1

See more details on using hashes here.

File details

Details for the file lofor-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: lofor-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for lofor-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bfe0277cf2a5d7d8aab7f04a25ef8c39668309bc67811795e1e5736d64164e89
MD5 f81ee632ab5cfb7d903009e15473f7cd
BLAKE2b-256 855270482eb3958ef6d96905e6d8b935f7f7d259eeba784d36eadb4ecc40fe1d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page