Compare commits

..

6 Commits

Author SHA1 Message Date
Dan Brown
0e2bbcec62 Updated version and assets for release v0.27.3 2019-09-03 21:50:12 +01:00
Dan Brown
fdd339f525 Merge branch 'master' into release 2019-09-03 21:49:46 +01:00
Dan Brown
16d8a667b1 Fixed issue preventing FormData posting correctly
- Due to migration from Axios, Instances where we were sending FormData
were not considered and always converted to JSON which resulted in empty
JSON bodies.

Related to #1621
2019-09-03 21:46:46 +01:00
Dan Brown
8cf7d6a83d Updated version and assets for release v0.27.2 2019-09-01 12:12:23 +01:00
Dan Brown
58a5008718 Merge branch 'master' into release 2019-09-01 12:12:10 +01:00
Dan Brown
7a4425473b Fixed URL gen issue causing incorrect scheme to be used
For #1613
2019-09-01 12:07:51 +01:00
5 changed files with 17 additions and 4 deletions

View File

@@ -25,7 +25,12 @@ class AppServiceProvider extends ServiceProvider
public function boot()
{
// Set root URL
URL::forceRootUrl(config('app.url'));
$appUrl = config('app.url');
if ($appUrl) {
$isHttps = (strpos($appUrl, 'https://') === 0);
URL::forceRootUrl($appUrl);
URL::forceScheme($isHttps ? 'https' : 'http');
}
// Custom validation methods
Validator::extend('image_extension', function ($attribute, $value, $parameters, $validator) {

2
public/dist/app.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -67,7 +67,7 @@ async function dataRequest(method, url, data = null) {
body: data,
};
if (typeof data === 'object') {
if (typeof data === 'object' && !(data instanceof FormData)) {
options.headers = {'Content-Type': 'application/json'};
options.body = JSON.stringify(data);
}

View File

@@ -22,4 +22,12 @@ class UrlTest extends TestCase
putenv('APP_URL=');
}
public function test_url_helper_sets_correct_scheme_even_when_request_scheme_is_different()
{
putenv('APP_URL=https://example.com/');
$this->refreshApplication();
$this->get('http://example.com/login')->assertSee('https://example.com/dist/styles.css');
putenv('APP_URL=');
}
}

View File

@@ -1 +1 @@
v0.27.1
v0.27.3