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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lofor-0.0.3.tar.gz
.
File metadata
- Download URL: lofor-0.0.3.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c0ec1be8d70fbcd406bbbb4617e0d45f8bd1fe16689db7e0e7d07d26906796a |
|
MD5 | 48017ac42247c200772f05c97f800109 |
|
BLAKE2b-256 | 8331c78c8699952cabe67eaa774326261e0c6d7780c68a96bb73591515d606f3 |
File details
Details for the file lofor-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: lofor-0.0.3-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 511374d66ac8f41b232e15c1f9a6e05368a214a2691adeac19fceec98f3a0ab4 |
|
MD5 | 6df84e3ada5b5fcd8c218e60051a53c8 |
|
BLAKE2b-256 | cf748f93ae80404cdc8709d3978d46402a9266d7c7d742c58a6a87ed377fe14e |