We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
User-Agent
1 parent 03fb901 commit 938849bCopy full SHA for 938849b
app/adapters/application.js
@@ -1,5 +1,17 @@
1
import RESTAdapter from '@ember-data/adapter/rest';
2
+import { inject as service } from '@ember/service';
3
+import { computed } from '@ember/object';
4
5
export default RESTAdapter.extend({
6
+ fastboot: service(),
7
+
8
namespace: 'api/v1',
9
10
+ headers: computed('fastboot.{isFastBoot,request.headers}', function() {
11
+ if (this.fastboot.isFastBoot) {
12
+ return { 'User-Agent': this.fastboot.request.headers.get('User-Agent') };
13
+ }
14
15
+ return {};
16
+ }),
17
});
0 commit comments