Skip to content

Conversation

@TimUx
Copy link
Owner

@TimUx TimUx commented Nov 18, 2025

Summary

  • add a fallback that reads the generated frontend config for the access code so API routes are protected even when the environment variable is not set

Testing

  • not run (not requested)

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +33 to +35
prefix = "window.FPP_CONFIG ="
if not raw.startswith(prefix):
return ""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Handle config.js files with leading comments

When ACCESS_CODE is unset but only provided in the bundled frontend config, the new fallback always returns an empty string because it requires config.js to start directly with "window.FPP_CONFIG =". The default config.js and template in this repo both begin with a comment, so the prefix check fails and control endpoints stay unprotected even though the frontend is configured with an access code. This affects deployments that rely on the checked-in config instead of the docker-generated one.

Useful? React with 👍 / 👎.

@TimUx TimUx merged commit 3b1b6ca into codex/research-falcon-player-api-and-endpoints-blz1ef Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants