Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow .well-known folder on Nginx #1913

Merged
merged 1 commit into from
Jan 13, 2025
Merged

Conversation

Matt75
Copy link
Contributor

@Matt75 Matt75 commented Jan 8, 2025

Questions Answers
Branch? 1.7.x
Description? See below
Fixed ticket? Fixes #1911

Updated the Nginx configuration to explicitly allow access to the .well-known directory while maintaining the restriction for other hidden files and directories (e.g., .htaccess, .htpasswd).

The .well-known directory is commonly used for domain verification and other standards-compliant purposes (e.g., Apple Pay’s apple-developer-merchantid-domain-association file). This change ensures that legitimate requests to .well-known resources are served while keeping other hidden files secure.

Steps to Verify:

  1. Place a test file (e.g., .well-known/test-file) in the web root.
  2. Verify that the file is accessible at http://yourdomain.com/.well-known/test-file.
  3. Confirm that other hidden files (e.g., .htaccess) remain inaccessible.

Changes Made:

  • Modified the existing location ~ /\. block to ensure .well-known is accessible.
  • The updated configuration maintains the deny rule for all other hidden files and directories, preserving security.

| Questions     | Answers
| ------------- | -------------------------------------------------------
| Branch?       | 1.7.x
| Description?  | See below
| Fixed ticket? | Fixes PrestaShop#1911

Updated the Nginx configuration to explicitly allow access to the `.well-known` directory while maintaining the restriction for other hidden files and directories (e.g., `.htaccess`, `.htpasswd`).

The `.well-known` directory is commonly used for domain verification and other standards-compliant purposes (e.g., Apple Pay’s `apple-developer-merchantid-domain-association` file). This change ensures that legitimate requests to `.well-known` resources are served while keeping other hidden files secure.

Steps to Verify:
1. Place a test file (e.g., `.well-known/test-file`) in the web root.
2. Verify that the file is accessible at `http://yourdomain.com/.well-known/test-file`.
3. Confirm that other hidden files (e.g., `.htaccess`) remain inaccessible.

Changes Made:
- Modified the existing `location ~ /\.` block to ensure `.well-known` is accessible.
- The updated configuration maintains the deny rule for all other hidden files and directories, preserving security.
@github-actions github-actions bot added the 1.7.x label Jan 8, 2025
@kpodemski kpodemski merged commit 0f3c3b1 into PrestaShop:1.7.x Jan 13, 2025
2 checks passed
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.

3 participants