From 259aa060102d340de7770fcfde87201a54141467 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 26 Jun 2018 10:13:32 +1200 Subject: [PATCH] DOCS More resilient example domain myapp.com is owned, example.com is specifically reserved for documentation use cases: https://en.wikipedia.org/wiki/Example.com [ci skip] --- .../01_Installation/How_To/Configure_Nginx.md | 4 ++-- .../01_Installation/How_To/MySQL_SSL_Support.md | 4 ++-- .../01_Installation/How_To/Setup_Nginx_and_HHVM.md | 2 +- .../03_Forms/How_Tos/05_Simple_Contact_Form.md | 2 +- docs/en/02_Developer_Guides/06_Testing/04_Fixtures.md | 2 +- .../06_Testing/How_Tos/01_Write_a_FunctionalTest.md | 2 +- .../06_Testing/How_Tos/03_Testing_Email.md | 4 ++-- .../02_Developer_Guides/07_Debugging/01_Error_Handling.md | 4 ++-- .../02_Developer_Guides/09_Security/04_Secure_Coding.md | 8 ++++---- docs/en/02_Developer_Guides/10_Email/index.md | 8 ++++---- docs/en/02_Developer_Guides/14_Files/03_File_Security.md | 4 ++-- docs/en/02_Developer_Guides/14_Files/04_File_Storage.md | 2 +- .../07_ReactJS_Redux_and_GraphQL.md | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/en/00_Getting_Started/01_Installation/How_To/Configure_Nginx.md b/docs/en/00_Getting_Started/01_Installation/How_To/Configure_Nginx.md index c1ba0cf4d..b9dafb44d 100644 --- a/docs/en/00_Getting_Started/01_Installation/How_To/Configure_Nginx.md +++ b/docs/en/00_Getting_Started/01_Installation/How_To/Configure_Nginx.md @@ -29,7 +29,7 @@ server { client_max_body_size 0; # Manage this in php.ini (upload_max_filesize & post_max_size) listen 80; root /path/to/ss/folder/public; - server_name myapp.com www.myapp.com; + server_name example.com www.example.com; # Defend against SS-2015-013 -- http://www.silverstripe.org/software/download/security-releases/ss-2015-013 if ($http_x_forwarded_host) { @@ -65,7 +65,7 @@ server { } ``` -The above configuration sets up a virtual host `myapp.com` with +The above configuration sets up a virtual host `example.com` with rewrite rules suited for SilverStripe. The location block for index.php passes the php script to the FastCGI-wrapper via a TCP socket. diff --git a/docs/en/00_Getting_Started/01_Installation/How_To/MySQL_SSL_Support.md b/docs/en/00_Getting_Started/01_Installation/How_To/MySQL_SSL_Support.md index fc38e3cd2..8ef127e20 100644 --- a/docs/en/00_Getting_Started/01_Installation/How_To/MySQL_SSL_Support.md +++ b/docs/en/00_Getting_Started/01_Installation/How_To/MySQL_SSL_Support.md @@ -127,7 +127,7 @@ On your Silverstripe instance: :::bash # Secure copy over SSH via rsync command. You may use an alternative method if desired. - rsync -avP user@db1.myapp.com:/path/to/client/certs /path/to/secure/folder + rsync -avP user@db1.example.com:/path/to/client/certs /path/to/secure/folder # Depending on your web server configuration, allow web server to read to SSL files sudo chown -R www-data:www-data /path/to/secure/folder @@ -148,7 +148,7 @@ Add or edit your `_ss_environment.php` configuration file. (See [Environment Man // These four define set the database connection details. define('SS_DATABASE_CLASS', 'MySQLPDODatabase'); - define('SS_DATABASE_SERVER', 'db1.myapp.com'); + define('SS_DATABASE_SERVER', 'db1.example.com'); define('SS_DATABASE_USERNAME', 'dbuser'); define('SS_DATABASE_PASSWORD', ''); diff --git a/docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md b/docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md index 33de5fb9e..c2a09e022 100644 --- a/docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md +++ b/docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md @@ -75,7 +75,7 @@ e.g. `/etc/nginx/sites-enabled/mysite`: server { listen 80; root /var/www/mysite/public; - server_name www.myapp.com; + server_name www.example.com; error_log /var/log/nginx/mysite.error.log; access_log /var/log/nginx/mysite.access.log; diff --git a/docs/en/02_Developer_Guides/03_Forms/How_Tos/05_Simple_Contact_Form.md b/docs/en/02_Developer_Guides/03_Forms/How_Tos/05_Simple_Contact_Form.md index 991a3c573..093e22b82 100644 --- a/docs/en/02_Developer_Guides/03_Forms/How_Tos/05_Simple_Contact_Form.md +++ b/docs/en/02_Developer_Guides/03_Forms/How_Tos/05_Simple_Contact_Form.md @@ -100,7 +100,7 @@ class ContactPageController extends PageController { $email = new Email(); - $email->setTo('test@myapp.com'); + $email->setTo('test@example.com'); $email->setFrom($data['Email']); $email->setSubject("Contact Message from {$data["Name"]}"); diff --git a/docs/en/02_Developer_Guides/06_Testing/04_Fixtures.md b/docs/en/02_Developer_Guides/06_Testing/04_Fixtures.md index 813d9053d..3b469cf22 100644 --- a/docs/en/02_Developer_Guides/06_Testing/04_Fixtures.md +++ b/docs/en/02_Developer_Guides/06_Testing/04_Fixtures.md @@ -340,7 +340,7 @@ values based on other fixture data. $factory->define('Member', [ 'Email' => function($obj, $data, $fixtures) { if(isset($data['FirstName']) { - $obj->Email = strtolower($data['FirstName']) . '@myapp.com'; + $obj->Email = strtolower($data['FirstName']) . '@example.com'; } }, 'Score' => function($obj, $data, $fixtures) { diff --git a/docs/en/02_Developer_Guides/06_Testing/How_Tos/01_Write_a_FunctionalTest.md b/docs/en/02_Developer_Guides/06_Testing/How_Tos/01_Write_a_FunctionalTest.md index 7b2c0da29..3c666c0be 100644 --- a/docs/en/02_Developer_Guides/06_Testing/How_Tos/01_Write_a_FunctionalTest.md +++ b/docs/en/02_Developer_Guides/06_Testing/How_Tos/01_Write_a_FunctionalTest.md @@ -28,7 +28,7 @@ class HomePageTest extends FunctionalTest // We should see a login form $login = $this->submitForm("LoginFormID", null, [ - 'Email' => 'test@myapp.com', + 'Email' => 'test@example.com', 'Password' => 'wrongpassword' ]); diff --git a/docs/en/02_Developer_Guides/06_Testing/How_Tos/03_Testing_Email.md b/docs/en/02_Developer_Guides/06_Testing/How_Tos/03_Testing_Email.md index 612043dda..c82316f16 100644 --- a/docs/en/02_Developer_Guides/06_Testing/How_Tos/03_Testing_Email.md +++ b/docs/en/02_Developer_Guides/06_Testing/How_Tos/03_Testing_Email.md @@ -13,7 +13,7 @@ use SilverStripe\Control\Email\Email; public function MyMethod() { $e = new Email(); - $e->To = "someone@myapp.com"; + $e->To = "someone@example.com"; $e->Subject = "Hi there"; $e->Body = "I just really wanted to email you and say hi."; $e->send(); @@ -27,7 +27,7 @@ To test that `MyMethod` sends the correct email, use the [SapphireTest::assertEm $this->assertEmailSent($to, $from, $subject, $body); // to assert that the email is sent to the correct person -$this->assertEmailSent("someone@myapp.com", null, "/th.*e$/"); +$this->assertEmailSent("someone@example.com", null, "/th.*e$/"); ``` Each of the arguments (`$to`, `$from`, `$subject` and `$body`) can be either one of the following. diff --git a/docs/en/02_Developer_Guides/07_Debugging/01_Error_Handling.md b/docs/en/02_Developer_Guides/07_Debugging/01_Error_Handling.md index 71c06a8bc..a2b87ab6c 100644 --- a/docs/en/02_Developer_Guides/07_Debugging/01_Error_Handling.md +++ b/docs/en/02_Developer_Guides/07_Debugging/01_Error_Handling.md @@ -114,9 +114,9 @@ SilverStripe\Core\Injector\Injector: MailHandler: class: Monolog\Handler\NativeMailerHandler constructor: - - me@myapp.com + - me@example.com - There was an error on your test site - - me@myapp.com + - me@example.com - error properties: ContentType: text/html diff --git a/docs/en/02_Developer_Guides/09_Security/04_Secure_Coding.md b/docs/en/02_Developer_Guides/09_Security/04_Secure_Coding.md index 03d0407bd..dced0ad87 100644 --- a/docs/en/02_Developer_Guides/09_Security/04_Secure_Coding.md +++ b/docs/en/02_Developer_Guides/09_Security/04_Secure_Coding.md @@ -450,9 +450,9 @@ given variable is done safely, with the assumption that it's an integer. To cast the variable as an integer, place `(int)` or `(integer)` before the variable. -For example: a page with the URL paramaters *myapp.com/home/add/1* requires that ''Director::urlParams['ID']'' be an +For example: a page with the URL paramaters *example.com/home/add/1* requires that ''Director::urlParams['ID']'' be an integer. We cast it by adding `(int)` - ''(int)Director::urlParams['ID']''. If a value other than an integer is -passed, such as *myapp.com/home/add/dfsdfdsfd*, then it returns 0. +passed, such as *example.com/home/add/dfsdfdsfd*, then it returns 0. Below is an example with different ways you would use this casting technique: @@ -461,7 +461,7 @@ Below is an example with different ways you would use this casting technique: public function CaseStudies() { - // cast an ID from URL parameters e.g. (myapp.com/home/action/ID) + // cast an ID from URL parameters e.g. (example.com/home/action/ID) $anotherID = (int)Director::urlParam['ID']; // perform a calculation, the prerequisite being $anotherID must be an integer @@ -612,7 +612,7 @@ this whitelist in your `.env` file, any request presenting a `Host` header that _not_ in this list will be blocked with a HTTP 400 error: ``` -SS_ALLOWED_HOSTS="www.myapp.com,myapp.com,subdomain.myapp.com" +SS_ALLOWED_HOSTS="www.example.com,example.com,subdomain.example.com" ``` Please note that if this configuration is defined, you _must_ include _all_ subdomains (eg www.) diff --git a/docs/en/02_Developer_Guides/10_Email/index.md b/docs/en/02_Developer_Guides/10_Email/index.md index 19c723e36..a8cc1578e 100644 --- a/docs/en/02_Developer_Guides/10_Email/index.md +++ b/docs/en/02_Developer_Guides/10_Email/index.md @@ -130,7 +130,7 @@ You can set the default sender address of emails through the `Email.admin_email` ```yaml SilverStripe\Control\Email\Email: - admin_email: support@myapp.com + admin_email: support@example.com ```
@@ -157,9 +157,9 @@ Configuration of those properties looks like the following: use SilverStripe\Control\Email\Email; use SilverStripe\Core\Config\Config; if(Director::isLive()) { - Config::modify()->set(Email::class, 'bcc_all_emails_to', "client@myapp.com"); + Config::modify()->set(Email::class, 'bcc_all_emails_to', "client@example.com"); } else { - Config::modify()->set(Email::class, 'send_all_emails_to', "developer@myapp.com"); + Config::modify()->set(Email::class, 'send_all_emails_to', "developer@example.com"); } ``` @@ -172,7 +172,7 @@ marked as spam. ```php $email = new Email(..); -$email->setReplyTo('reply@myapp.com'); +$email->setReplyTo('reply@example.com'); ``` ### Setting Custom Headers diff --git a/docs/en/02_Developer_Guides/14_Files/03_File_Security.md b/docs/en/02_Developer_Guides/14_Files/03_File_Security.md index ac8de9f91..52e65a624 100644 --- a/docs/en/02_Developer_Guides/14_Files/03_File_Security.md +++ b/docs/en/02_Developer_Guides/14_Files/03_File_Security.md @@ -179,9 +179,9 @@ assets/ The urls for these two files, however, do not reflect the physical structure directly. -* `http://www.myapp.com/assets/33be1b95cb/OldCompanyLogo.gif` will be served directly from the web server, +* `http://www.example.com/assets/33be1b95cb/OldCompanyLogo.gif` will be served directly from the web server, and will not invoke a php request. -* `http://www.myapp.com/assets/a870de278b/NewCompanyLogo.gif` will be routed via a 404 handler to PHP, +* `http://www.example.com/assets/a870de278b/NewCompanyLogo.gif` will be routed via a 404 handler to PHP, which will be passed to the `[ProtectedFileController](api:SilverStripe\Assets\Storage\ProtectedFileController)` controller, which will serve up the content of the hidden file, conditional on a permission check. diff --git a/docs/en/02_Developer_Guides/14_Files/04_File_Storage.md b/docs/en/02_Developer_Guides/14_Files/04_File_Storage.md index 6d9beae7f..8e45b5344 100644 --- a/docs/en/02_Developer_Guides/14_Files/04_File_Storage.md +++ b/docs/en/02_Developer_Guides/14_Files/04_File_Storage.md @@ -74,7 +74,7 @@ This corresponds to a file with the following properties: - Variant: FitWzYwLDYwXQ (corresponds to Fit[60,60]) The URL for this file will match the physical location on disk: -`http://www.myapp.com/assets/Uploads/b63923d8d4/BannerHeader__FitWzYwLDYwXQ.jpg`. +`http://www.example.com/assets/Uploads/b63923d8d4/BannerHeader__FitWzYwLDYwXQ.jpg`. For more information on how protected files are stored see the [file security](/developer_guides/files/file_security) section. diff --git a/docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/07_ReactJS_Redux_and_GraphQL.md b/docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/07_ReactJS_Redux_and_GraphQL.md index bc49dc721..d83d3da0d 100644 --- a/docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/07_ReactJS_Redux_and_GraphQL.md +++ b/docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/07_ReactJS_Redux_and_GraphQL.md @@ -112,7 +112,7 @@ The above query is almost self-descriptive. It gets a user by ID, returns his or { "user": { "name": "Test user", - "email": "test@myapp.com", + "email": "test@example.com", "blogPosts": [ { "title": "How to be awesome at GraphQL",