Repository navigation
Licence GPL-3.0 et API locale réservée à l'interface - #8
Merged
Merged
Conversation
- LICENSE (GNU GPL v3) et section Licence du README - Serveur : les requêtes /api venant d'une page web autre que l'interface (Tauri, Vite en dev, interface servie par le serveur, LWL_ALLOWED_ORIGINS) sont refusées en 403, ainsi qu'un Host non local (rebinding DNS) ; CORS limité à ces origines au lieu de *. curl et scripts inchangés. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Licence
LICENSE(GNU GPL v3, texte officiel) et d'une section « Licence » dans le README. Cohérent avec les ressources reprises du client Leek Wars, déjà sous GPL v3.Sécurité : API locale
Avant, le serveur répondait
Access-Control-Allow-Origin: *: n'importe quel site ouvert dans le navigateur pouvait piloter127.0.0.1:3737(lancer des combats, dépenser du capital, lancer des analyses IA payantes…).Maintenant (
rejectedAccessdansserver/index.js), une requête/apiest refusée en 403forbidden_originsi :Originn'est pas l'interface :tauri://localhost,http(s)://tauri.localhost, Vitelocalhost:1420, le serveur lui-même, ouLWL_ALLOWED_ORIGINS;Originmais vient d'un autre site (Sec-Fetch-Site: cross-site, ex. balise<img>) ;Hostn'est pas local (protection contre le rebinding DNS), quand le serveur écoute en local.Le CORS ne renvoie plus
*mais l'origine autorisée. curl, scripts et Claude (sansOrigin) ne changent pas. Les fichiers statiques ne sont pas concernés.Tests
12 cas testés au curl, tous conformes : appli Tauri (Windows et macOS/Linux), Vite, même origine, préflight et scripts → acceptés ; site tiers en GET, préflight, POST de formulaire simple, balise
<img>et rebinding DNS → 403, sans effet (le POST n'a rien modifié).🤖 Generated with Claude Code