Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/datadome/datadome-dotnetcore-demo
Integration demo for DataDome's ASP .NET Core module
https://github.com/datadome/datadome-dotnetcore-demo
demo dotnetcore module
Last synced: about 2 months ago
JSON representation
Integration demo for DataDome's ASP .NET Core module
- Host: GitHub
- URL: https://github.com/datadome/datadome-dotnetcore-demo
- Owner: DataDome
- Created: 2024-07-16T18:33:26.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-07-19T07:04:05.000Z (6 months ago)
- Last Synced: 2024-11-19T08:55:43.968Z (about 2 months ago)
- Topics: demo, dotnetcore, module
- Language: C#
- Homepage: https://docs.datadome.co/docs/aspnet-core
- Size: 5.86 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DataDome ASP .NET Core demo
This repository provides an example of the DataDome ASP .NET Core module using Docker.
For additional information, please check our [public documentation](https://docs.datadome.co/docs/aspnet-core).
## 1 - Configuration
Define the following ENV variables
Set your `datadome-server-side-key` (found inside your [DataDome Dashboard](https://app.datadome.co/dashboard/management/integrations)).```
export DATADOME_SERVER_SIDE_KEY=datadome-server-side-key
export DATADOME_TIMEOUT=300
export DATADOME_ENDPOINT=api.datadome.co
export DATADOME_PROTOCOL=https
```## 2 - Build
```
docker build -t datadome-dotnetcore-image ./
```## 3 - Run
```
docker run -dit --name datadome-dotnetcore-container -p 8080:80 \
-e DataDomeConfiguration:LicenseKey=${DATADOME_SERVER_SIDE_KEY} \
-e DataDomeConfiguration:Timeout=${DATADOME_TIMEOUT} \
-e DataDomeConfiguration:ApiDomain=${DATADOME_ENDPOINT} \
-e DataDomeConfiguration:ApiProtocol=${DATADOME_PROTOCOL} \
datadome-dotnetcore-image
```## 4 - Test
```
curl -v http://localhost:8080/
```Your request was protected (the header `X-DataDome: protected` is present) and is shown in your Dashboard.
## 5 - Logs
```
docker logs -f datadome-dotnetcore-demo-container
```## 6 - Stop
```
docker stop datadome-dotnetcore-demo-container
```