Appearance
Getting started
This guide covers the prerequisites you need to start integrating with foreq.
Components
The core foreq components of a foreq configuration are:
- Projects
- Routes
- Security
Project
A project is a logical grouping of routes. For example, consider a to-do application called MyDo. This app needs integrations for payment processing and email sending. In this context, you would create a project on Foreq named MyDo with two routes, one for payment process and the other for email sending
Route
Routes are the real meat of foreq. Routes contain all the configuration information needed to successfully forward your requests to destination servers and return predictable responses.
Security
Security rules impose restrictions on routes, ensuring that access is controlled and regulated according to predefined policies. These rules can dictate who can access specific routes, under what conditions thereby enhancing the overall security posture of the application. By implementing these rules, developers can safeguard sensitive data to only go to desired clients and maintain the integrity of the application’s functionality.
Creating your first request
Foreq offers an intuitive workflow and tries not to ambush you with a mountain of configuration to get started
Follow the steps below to begin forwarding requests through foreq.
Create a project
On login, Click on the Create project
button on the https://foreq.dev/projects.
In the modal that appears, select the desired protocol for the request, fill out the inputs for your desired protocol, this would be different between protocols.
If the subdomain you created was mydo
now all your routes will be available on https://mydo.api.foreq.dev/<route>
.
Create a Request
On the projects list page, click on the routes
button on the project card, this should redirect you to the routes page for that project.
At the bottom left of the screen, on the routes list you should see a Create a new route
button, clicking on that should display a popup with the base configuration for your route.
- Label: Text used to easily identify your route
- Route: Route to make a request to in order to process a request.
- HTTP method: HTTP method to use when accessing the resource.
- Destination URL: destination server with resource.
After filling out the form, click confirm. Now on the left side of the routes list page you should see your request there. On the top of the card is the request label and directly below it is the endpoint which you can use on your clients to get to your resource. This URL would be of the form https://<suddomain>.api.foreq.dev/<route>
Allowing requests to endpoint
By default, routes are blocked and can’t be accessed by clients. To change this for now add a wildcard(*) origin to the Allowed origins sections of your project settings.
To do take the following steps:
- Navigate to the projects page at
https://app.foreq.dev/projects
- In the security section add
*
to your allowed origins. this is a wildcard that means any client can use the route you just created.
This section doesn’t cover security features of foreq but know for now that this feature allows access to urls added to the allowed origins. This isn’t a secure security solution but it is a good place to start.