Skip to content

Commit 3f5e378

Browse files
committed
on permet d'accéder au blog via une clef d'api
1 parent 24f7013 commit 3f5e378

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

docker-compose.override.yml-dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ services:
55
- "9225:80"
66
environment:
77
AFUP_GLOBAL_MENU_PREFIX: 'https://localhost:9205'
8-
AFUP_WEBSITE_URL: 'https://apachephp:80'
9-
8+
AFUP_WEBSITE_URL: 'https://172.17.0.1:9205'
9+
AFUP_BLOG_API_KEY: '123456'

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ services:
88
uid: ${CURRENT_UID:-1001}
99
gid: "1001"
1010
environment:
11-
AFUP_WEBSITE_URL: 'https://apachephp:80'
1211
MYSQL_ADDON_DB: event
1312
MYSQL_ADDON_USER: afup
1413
MYSQL_ADDON_PASSWORD: afup

resources/themes/hestia-pro_child/page-curl.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@
6868
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
6969
}
7070

71+
$afupBlogApiKey = getenv('AFUP_BLOG_API_KEY');
72+
if ($afupBlogApiKey) {
73+
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
74+
'X-Afup-Blog-Api-Key:' . $afupBlogApiKey,
75+
));
76+
}
77+
7178
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
7279

7380
if (defined('WP_DEBUG') && WP_DEBUG == true) {

0 commit comments

Comments
 (0)