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.1.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

lofor-0.0.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lofor-0.0.1.tar.gz
  • Upload date:
  • Size: 6.0 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.1.tar.gz
Algorithm Hash digest
SHA256 efac641bb078a49df1b8f735901cb2e0f1e39438b4618db38b60e5f55b99ec95
MD5 0683f0db7479fe2e6397e8beb5525ab9
BLAKE2b-256 293e755d7ed2cf5f87436154f111007722f9b01a934c65fc065f01a1f6d54248

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lofor-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d079f9b813e7feae54fc5747e48f4cfcd3221f5dee8638ecf390f4ca18e8136c
MD5 44e922ba7b0922bb4912c3bdb9bf8078
BLAKE2b-256 edfe1aaf62ad18f564831d9aca0e5b3374680fa612cbb97fef62aa60920cc7a4

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