mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-10-10 10:48:10 +02:00
Optimized Bleusky API redirect domain
This commit is contained in:
@@ -60,13 +60,13 @@
|
|||||||
]
|
]
|
||||||
+
|
+
|
||||||
(
|
(
|
||||||
(BLUESKY_VIEW_DOMAIN != 'api.bsky.app')
|
(BLUESKY_VIEW_DOMAIN_FINAL != 'api.bsky.app')
|
||||||
| ternary([
|
| ternary([
|
||||||
{
|
{
|
||||||
'type': 'A',
|
'type': 'A',
|
||||||
'solo': True,
|
'solo': True,
|
||||||
'zone': (BLUESKY_VIEW_DOMAIN | to_zone),
|
'zone': (BLUESKY_VIEW_DOMAIN_FINAL | to_zone),
|
||||||
'name': BLUESKY_VIEW_DOMAIN,
|
'name': BLUESKY_VIEW_DOMAIN_FINAL,
|
||||||
'content': networks.internet.ip4,
|
'content': networks.internet.ip4,
|
||||||
'proxied': False,
|
'proxied': False,
|
||||||
'state': (
|
'state': (
|
||||||
@@ -77,8 +77,8 @@
|
|||||||
{
|
{
|
||||||
'type': 'AAAA',
|
'type': 'AAAA',
|
||||||
'solo': True,
|
'solo': True,
|
||||||
'zone': (BLUESKY_VIEW_DOMAIN | to_zone),
|
'zone': (BLUESKY_VIEW_DOMAIN_FINAL | to_zone),
|
||||||
'name': BLUESKY_VIEW_DOMAIN,
|
'name': BLUESKY_VIEW_DOMAIN_FINAL,
|
||||||
'content': (networks.internet.ip6 | default('')),
|
'content': (networks.internet.ip6 | default('')),
|
||||||
'proxied': False,
|
'proxied': False,
|
||||||
'state': (
|
'state': (
|
||||||
|
@@ -20,11 +20,11 @@
|
|||||||
proxy_extra_configuration: "{{ BLUESKY_FRONT_PROXY_CONTENT }}"
|
proxy_extra_configuration: "{{ BLUESKY_FRONT_PROXY_CONTENT }}"
|
||||||
when: BLUESKY_WEB_ENABLED | bool
|
when: BLUESKY_WEB_ENABLED | bool
|
||||||
|
|
||||||
- name: "Include front proxy for {{ BLUESKY_VIEW_DOMAIN }}:{{ BLUESKY_VIEW_PORT }}"
|
- name: "Include front proxy for {{ BLUESKY_VIEW_DOMAIN_FINAL }}:{{ BLUESKY_VIEW_PORT }}"
|
||||||
include_role:
|
include_role:
|
||||||
name: sys-stk-front-proxy
|
name: sys-stk-front-proxy
|
||||||
vars:
|
vars:
|
||||||
domain: "{{ BLUESKY_VIEW_DOMAIN }}"
|
domain: "{{ BLUESKY_VIEW_DOMAIN_FINAL }}"
|
||||||
http_port: "{{ BLUESKY_VIEW_PORT }}"
|
http_port: "{{ BLUESKY_VIEW_PORT }}"
|
||||||
when: BLUESKY_VIEW_ENABLED | bool
|
when: BLUESKY_VIEW_ENABLED | bool
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
BLUESKY_REDIRECT_DOMAIN_MAPPINGS: >-
|
BLUESKY_REDIRECT_DOMAIN_MAPPINGS: >-
|
||||||
{{
|
{{
|
||||||
( (BLUESKY_WEB_ENABLED | bool) | ternary([], [ {'source': BLUESKY_WEB_DOMAIN, 'target': BLUESKY_API_DOMAIN } ]) )
|
( (BLUESKY_WEB_ENABLED | bool) | ternary([], [ {'source': BLUESKY_WEB_DOMAIN, 'target': BLUESKY_API_DOMAIN } ]) )
|
||||||
+ ( (BLUESKY_VIEW_ENABLED | bool) | ternary([], [ {'source': BLUESKY_VIEW_DOMAIN, 'target': BLUESKY_API_DOMAIN } ]) )
|
+ ( (BLUESKY_VIEW_ENABLED | bool) | ternary([], [ {'source': BLUESKY_VIEW_DOMAIN_LOCAL, 'target': BLUESKY_API_DOMAIN } ]) )
|
||||||
}}
|
}}
|
||||||
|
|
||||||
- name: "Redirect deactivated BlueSky Services to {{ BLUESKY_API_DOMAIN }}"
|
- name: "Redirect deactivated BlueSky Services to {{ BLUESKY_API_DOMAIN }}"
|
||||||
|
@@ -27,9 +27,10 @@ BLUESKY_WEB_PORT: "{{ ports.localhost.http['web-app-bluesky_web']
|
|||||||
|
|
||||||
## View
|
## View
|
||||||
BLUESKY_VIEW_ENABLED: "{{ applications | get_app_conf(application_id, 'docker.services.view.enabled') }}"
|
BLUESKY_VIEW_ENABLED: "{{ applications | get_app_conf(application_id, 'docker.services.view.enabled') }}"
|
||||||
BLUESKY_VIEW_DOMAIN: "{{ domains[application_id].view if BLUESKY_VIEW_ENABLED else 'api.bsky.app' }}"
|
BLUESKY_VIEW_DOMAIN_LOCAL: "{{ domains[application_id].view }}"
|
||||||
BLUESKY_VIEW_URL: "{{ WEB_PROTOCOL }}://{{ BLUESKY_VIEW_DOMAIN }}"
|
BLUESKY_VIEW_DOMAIN_FINAL: "{{ BLUESKY_VIEW_DOMAIN_LOCAL if BLUESKY_VIEW_ENABLED else 'api.bsky.app' }}"
|
||||||
BLUESKY_VIEW_DID: "did:web:{{ BLUESKY_VIEW_DOMAIN }}"
|
BLUESKY_VIEW_URL: "{{ WEB_PROTOCOL }}://{{ BLUESKY_VIEW_DOMAIN_FINAL }}"
|
||||||
|
BLUESKY_VIEW_DID: "did:web:{{ BLUESKY_VIEW_DOMAIN_FINAL }}"
|
||||||
BLUESKY_VIEW_PORT: "{{ ports.localhost.http['web-app-bluesky_view'] }}"
|
BLUESKY_VIEW_PORT: "{{ ports.localhost.http['web-app-bluesky_view'] }}"
|
||||||
|
|
||||||
## Server
|
## Server
|
||||||
|
Reference in New Issue
Block a user