diff --git a/app.py b/app.py index 1a9756d..b00d903 100644 --- a/app.py +++ b/app.py @@ -1173,11 +1173,8 @@ def admin_settings(): return redirect(url_for('admin_settings')) elif action == 'regenerate_hermes_key': - # Generate a new Hermes API key, persist it, and show it exactly once. - new_key = generate_hermes_api_key() - set_hermes_api_key(new_key) - session['hermes_key_just_generated'] = new_key - flash('Hermes API key regenerated. Copy it now — it will not be shown again.', 'success') + # Legacy action: no longer exposed in UI. Key is managed via HERMES_API_KEY env var. + flash('Hermes API key is managed via the HERMES_API_KEY environment variable.', 'info') return redirect(url_for('admin_settings')) return render_template( diff --git a/booth_settings_test.json b/booth_settings_test.json new file mode 100644 index 0000000..3f3e6fa --- /dev/null +++ b/booth_settings_test.json @@ -0,0 +1,3 @@ +{ + "hermes_api_key": "gAAAAABqcRfLNGwskLTnCfsDK7IQ8nCkUVfngkxSLq74yR9hlwSzO89MiEAZS7r1PU4Lmglq0S1ApjkonkjMEpE0NmT8oka8HfCov6X5Fpr8IJOa-DRJqOhnNL5WM98dsGoydBlGKstj" +} \ No newline at end of file diff --git a/templates/admin/settings.html b/templates/admin/settings.html index 0a55d82..45d7be7 100644 --- a/templates/admin/settings.html +++ b/templates/admin/settings.html @@ -262,26 +262,15 @@ - +
Hermes uses this key in the Authorization header when POSTing generated Suno prompts back to the callback endpoint.
+Hermes uses this key in the Authorization header when POSTing generated Suno prompts back to the callback endpoint. The key is configured via the Portainer environment variable HERMES_API_KEY.
Current key: {{ hermes_key_masked }}
New key (copy it now — it will not be shown again):
-{{ hermes_key_just_generated }}
- -⚠️ No Hermes API key is configured. Generate one before using the callback workflow.
+ {% if not hermes_key_set %} +⚠️ No Hermes API key is configured. Set the HERMES_API_KEY environment variable in Portainer before using the callback workflow.
{% endif %} - -