Overview
This guide describes the necessary steps to configure the REST interface (Swagger) of the RetailForce Middleware to use HTTPS.
Prerequisites
- Access to the Windows host
- Text editor (e.g., Notepad++ or Visual Studio Code)
Step-by-Step Guide
1. Stop Windows Service
- Open Windows Services Manager:
- Press
Win + R
, typeservices.msc
and press Enter - Alternatively: Via Control Panel → Administrative Tools → Services
- Press
- Find the RetailForce service in the list
- Right-click on the service and select "Stop"
2. Edit Configuration File
- Navigate to the installation directory:
-
C:\Program Files\RetailForce\Fiscal Webservice
-
- Open the file
appsettings.json
with a text editor - Ensure that the following parameters in the "AppSettings" section are configured correctly:
...
"AppSettings": { "Secret": "****", "Portnumber": 7678, "PortnumberHttps": 7677, "UseHttps": true, "UseHttpsRedirection": true, "HttpsCertificateFilename": "development.pfx", "HttpsCertificatePassword": "changeme", "LogName": "RetailForce Fiscalisation", "LogEventLog": true, "LogLevelFilter": "Debug" } }Important:
- Make sure that both
UseHttps
andUseHttpsRedirection
are set totrue
- The path specification for
HttpsCertificateFilename
is relative to the installation directory - For production environments, use a valid, trusted certificate instead of "development.pfx"
- Make sure that both
- Save the file and close the editor
3. Start Windows Service
- Return to the Windows Services Manager
- Find the RetailForce service
- Right-click on the service and select "Start"
4. Verification
After restarting the service, the REST endpoints should now be available via HTTPS:
- Open a web browser
- Navigate to the Swagger UI at:
https://[server-name]:7677/swagger/index.html
- Verify that a lock icon is displayed in the address bar, indicating a secure HTTPS connection
Summary
The REST interface is now configured to use HTTPS. All API requests will automatically be redirected from HTTP to HTTPS, which improves communication security and ensures data integrity.
Comments
0 comments
Article is closed for comments.