caddyserver / caddyserver/website

Proposal: restrain the use of environment variables.

Open
#464 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
Dominant language
HTML
Stars
227
Forks
213
Avg merge
3h 52m
Merged PRs (30d)
1

Description

For now, Environment variables in this form are substituted before Caddyfile parsing begins, which will cause problem as the environment variables are not valid components and can't be parsed properly before they are substituted.
You can even write something like this:

example.com {
	root * /var/www/wordpress
	encode
	php_fastcgi unix//run/php/php-version-fpm.sock
	file_server
{$CLOSEBRACKET}

Restrain the use of environment variables so it can be interpreted as one of the structural components describled here would be a good starting point, and enforcing such rule should encourage people to write better structured Caddyfile when using environment variables.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Caddyfile environment-variable and structure documentation, then read issue 6881 for the reported parsing problem. Determine whether this website issue should document or define a restriction, and consider the work complete when the intended rule and its scope are unambiguous to Caddyfile users.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.