---
id: 3022
title: CORS with Loopback & Angular Apps
slug: cors-with-loopback-angular-apps
date: '2019-08-05T17:47:00Z'
modified: '2019-08-05T17:48:26Z'
status: publish
type: post
author: pmoelgaard
categories:
  - Documentation
tags:
  - AngularJS
  - Loopback
excerpt: null
canonicalPath: /posts/cors-with-loopback-angular-apps
featuredImage: null
commentCount: 0
wordCount: 57
readingTimeMinutes: 1
hasMedia: false
hasVideos: false
url: 'https://forwardthinking.pemo.me/posts/cors-with-loopback-angular-apps'
---
To get the two running nicely together in respect to CORS, don't forget to disable the origin only default policy of Loopback by setting the origin in the CORS configuration to "\*" in the middleware.json file.

{
  ...
  "initial": {
    "compression": {},
    "cors": {
      "params": {
        "origin": "\*",
        "credentials": true,
        "maxAge": 86400
      }
    }
    ...
  }
}
