mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-25 06:27:59 +01:00
T350: Updated the name of the CSRF header used by Laravel 5.
This commit is contained in:
parent
3cb6da3048
commit
0463c83578
10 changed files with 8 additions and 250 deletions
|
@ -92,7 +92,7 @@ angular.module('ponyfm').controller "account-albums-edit", [
|
|||
formData.append 'track_ids', _.map($scope.tracks, (t) -> t.id).join()
|
||||
|
||||
xhr.open 'POST', url, true
|
||||
xhr.setRequestHeader 'X-Token', pfm.token
|
||||
xhr.setRequestHeader 'X-CSRF-Token', pfm.token
|
||||
$scope.isSaving = true
|
||||
xhr.send formData
|
||||
|
||||
|
@ -140,4 +140,4 @@ angular.module('ponyfm').controller "account-albums-edit", [
|
|||
$scope.$on '$locationChangeStart', (e) ->
|
||||
return if !$scope.isDirty
|
||||
e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?')
|
||||
]
|
||||
]
|
||||
|
|
|
@ -51,7 +51,7 @@ angular.module('ponyfm').controller "account-settings", [
|
|||
formData.append name, value
|
||||
|
||||
xhr.open 'POST', '/api/web/account/settings/save', true
|
||||
xhr.setRequestHeader 'X-Token', pfm.token
|
||||
xhr.setRequestHeader 'X-CSRF-Token', pfm.token
|
||||
$scope.isSaving = true
|
||||
xhr.send formData
|
||||
|
||||
|
@ -60,4 +60,4 @@ angular.module('ponyfm').controller "account-settings", [
|
|||
$scope.$on '$stateChangeStart', (e) ->
|
||||
return if $scope.selectedTrack == null || !$scope.isDirty
|
||||
e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?')
|
||||
]
|
||||
]
|
||||
|
|
|
@ -100,7 +100,7 @@ angular.module('ponyfm').controller "account-track", [
|
|||
formData.append 'show_song_ids', _.map(_.values($scope.selectedSongs), (s) -> s.id).join()
|
||||
|
||||
xhr.open 'POST', '/api/web/tracks/edit/' + $scope.edit.id, true
|
||||
xhr.setRequestHeader 'X-Token', pfm.token
|
||||
xhr.setRequestHeader 'X-CSRF-Token', pfm.token
|
||||
$scope.isSaving = true
|
||||
xhr.send formData
|
||||
|
||||
|
|
|
@ -46,6 +46,6 @@ angular.module('ponyfm').factory('upload', [
|
|||
formData.append('track', file);
|
||||
|
||||
xhr.open 'POST', '/api/web/tracks/upload', true
|
||||
xhr.setRequestHeader 'X-Token', pfm.token
|
||||
xhr.setRequestHeader 'X-CSRF-Token', pfm.token
|
||||
xhr.send formData
|
||||
])
|
||||
])
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
'sendfile' => false,
|
||||
'uglify-js' => 'uglifyjs',
|
||||
'uglify-css' => 'uglifycss',
|
||||
'coffee' => 'coffee',
|
||||
'debug' => true,
|
||||
'url' => 'pony.fm.local',
|
||||
'files_directory' => '/vagrant-files/',
|
||||
'mlpma_directory' => '/vagrant-files/mlpma/',
|
||||
'node' => null,
|
||||
'node_paths' => ['/usr/lib/node_modules/'],
|
||||
'secure' => false,
|
||||
);
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
'driver' => 'database',
|
||||
);
|
|
@ -1,85 +0,0 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Database Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which of the database connections below you wish
|
||||
| to use as your default connection for all database work. Of course
|
||||
| you may use many connections at once using the Database library.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => 'mysql',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here are each of the database connections setup for your application.
|
||||
| Of course, examples of configuring each database platform that is
|
||||
| supported by Laravel is shown below to make development simple.
|
||||
|
|
||||
|
|
||||
| All database work in Laravel is done through the PHP PDO facilities
|
||||
| so make sure you have the driver for your particular database of
|
||||
| choice installed on your machine before you begin development.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => array(
|
||||
|
||||
'mysql' => array(
|
||||
'driver' => 'mysql',
|
||||
'host' => 'localhost',
|
||||
'database' => 'homestead',
|
||||
'username' => 'homestead',
|
||||
'password' => 'secret',
|
||||
'charset' => 'utf8',
|
||||
'collation' => 'utf8_unicode_ci',
|
||||
'prefix' => '',
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Migration Repository Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This table keeps track of all the migrations that have already run for
|
||||
| your application. Using this information, we can determine which of
|
||||
| the migrations on disk have not actually be run in the databases.
|
||||
|
|
||||
*/
|
||||
|
||||
'migrations' => 'migrations',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Redis Databases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Redis is an open source, fast, and advanced key-value store that also
|
||||
| provides a richer set of commands than a typical key-value systems
|
||||
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||
|
|
||||
*/
|
||||
|
||||
'redis' => array(
|
||||
|
||||
'cluster' => true,
|
||||
|
||||
'default' => array(
|
||||
'host' => '127.0.0.1',
|
||||
'port' => 6379,
|
||||
'database' => 0,
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
);
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
return [
|
||||
'version' => 1,
|
||||
'urls' => [
|
||||
'api' => 'https://api.poniverse.net/v1/',
|
||||
'register' => 'https://poniverse.net/register?site=pony.fm',
|
||||
'auth' => 'https://poniverse.net/oauth/authorize',
|
||||
'token' => 'https://poniverse.net/oauth/access_token'
|
||||
],
|
||||
'client_id' => 'AAopdYDbn6JarV0Wo025gYQNxS1VXcj8GCa0raSC',
|
||||
'secret' => 'cxlA1jgGRZEPp8hg4VNB5v2gx7aY6DUtJSwUUHzT'
|
||||
];
|
|
@ -1,125 +0,0 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Session Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default session "driver" that will be used on
|
||||
| requests. By default, we will use the lightweight native driver but
|
||||
| you may specify any of the other wonderful drivers provided here.
|
||||
|
|
||||
| Supported: "native", "cookie", "database", "apc",
|
||||
| "memcached", "redis", "array"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => 'native',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Lifetime
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the number of minutes that you wish the session
|
||||
| to be allowed to remain idle for it is expired. If you want them
|
||||
| to immediately expire when the browser closes, set it to zero.
|
||||
|
|
||||
*/
|
||||
|
||||
'lifetime' => 120,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session File Location
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the native session driver, we need a location where session
|
||||
| files may be stored. A default has been set for you but a different
|
||||
| location may be specified. This is only needed for file sessions.
|
||||
|
|
||||
*/
|
||||
|
||||
'files' => storage_path().'/sessions',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Connection
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" session driver, you may specify the database
|
||||
| connection that should be used to manage your sessions. This should
|
||||
| correspond to a connection in your "database" configuration file.
|
||||
|
|
||||
*/
|
||||
|
||||
'connection' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" session driver, you may specify the table we
|
||||
| should use to manage the sessions. Of course, a sensible default is
|
||||
| provided for you; however, you are free to change this as needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'table' => 'sessions',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Sweeping Lottery
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Some session drivers must manually sweep their storage location to get
|
||||
| rid of old sessions from storage. Here are the chances that it will
|
||||
| happen on a given request. By default, the odds are 2 out of 100.
|
||||
|
|
||||
*/
|
||||
|
||||
'lottery' => array(2, 100),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the name of the cookie used to identify a session
|
||||
| instance by ID. The name specified here will get used every time a
|
||||
| new session cookie is created by the framework for every driver.
|
||||
|
|
||||
*/
|
||||
|
||||
'cookie' => 'laravel_session',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The session cookie path determines the path for which the cookie will
|
||||
| be regarded as available. Typically, this will be the root path of
|
||||
| your application but you are free to change this when necessary.
|
||||
|
|
||||
*/
|
||||
|
||||
'path' => '/',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Domain
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the domain of the cookie used to identify a session
|
||||
| in your application. This will determine which domains the cookie is
|
||||
| available to in your application. A sensible default has been set.
|
||||
|
|
||||
*/
|
||||
|
||||
'domain' => null,
|
||||
|
||||
);
|
|
@ -23,7 +23,7 @@ else
|
|||
sudo make install
|
||||
fi
|
||||
|
||||
mkdir /vagrant/storage/logs/system
|
||||
mkdir -p /vagrant/storage/logs/system
|
||||
/vagrant/vagrant/copy-and-restart-configs.sh
|
||||
|
||||
cd /vagrant
|
||||
|
|
Loading…
Reference in a new issue