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

Adds docs about serving octane in HTTPS #229

Merged
merged 2 commits into from
Apr 21, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update README.md
  • Loading branch information
taylorotwell committed Apr 21, 2021
commit 847f9f10d836526dccb9a0c36204cf38443ccf27
18 changes: 3 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,14 @@ php artisan octane:start

By default, Octane will start the server on port 8000, so you may access your application in a web browser via `https://localhost:8000`.

#### Serving Your Application in HTTPS
#### Serving Your Application Via HTTPS

By default, applications running in an Octane server generate links using plain HTTP. The `OCTANE_HTTPS` environment variable, used within your application's `config/octane.php` configuration file, should be set to `true` when you plan to serve your application on HTTPS.
By default, applications running via Octane generate links prefixed with `https://`. The `OCTANE_HTTPS` environment variable, used within your application's `config/octane.php` configuration file, can be set to `true` when serving your application via HTTPS. When this configuration value is set to `true`, Octane will instruct Laravel to prefix all generated links with `https://`:

```php
/*
|--------------------------------------------------------------------------
| Force HTTPS
|--------------------------------------------------------------------------
|
| When this configuration value is set to "true", Octane will inform the
| framework that all absolute links must be generated using the HTTPS
| protocol. Otherwise your links may be generated using plain HTTP.
|
*/

'https' => env('OCTANE_HTTPS', false),
'https' => env('OCTANE_HTTPS', false),
```


#### Watching For File Changes

Since your application is loaded in memory once when the Octane server starts, any changes to your application's files will not be reflected when you refresh your browser. For example, route definitions added to your `routes/web.php` file will not be reflected until the server is restarted. For convenience, you may use the `--watch` flag to instruct Octane to automatically restart the server on any file changes within your application:
Expand Down