jonahkh
2020-06-01 d47134f7865cc74db2465daacdbbf24b4049f34d
add cors to shelter-service
2 files deleted
5 files modified
598 ■■■■■ changed files
adopt-a-pup/.idea/jarRepositories.xml 20 ●●●●● patch | view | raw | blame | history
adopt-a-pup/.idea/workspace.xml 540 ●●●●● patch | view | raw | blame | history
adopt-a-pup/envoy-gateway/envoy-gateway-configmap.yaml 2 ●●● patch | view | raw | blame | history
adopt-a-pup/shelter-service/src/main/java/com/redhat/do328/adoptApup/shelterservice/ShelterController.java 7 ●●●● patch | view | raw | blame | history
adopt-a-pup/web-app/package-lock.json 14 ●●●●● patch | view | raw | blame | history
adopt-a-pup/web-app/package.json 1 ●●●● patch | view | raw | blame | history
adopt-a-pup/web-app/src/App.tsx 14 ●●●● patch | view | raw | blame | history
adopt-a-pup/.idea/jarRepositories.xml
File was deleted
adopt-a-pup/.idea/workspace.xml
File was deleted
adopt-a-pup/envoy-gateway/envoy-gateway-configmap.yaml
@@ -37,7 +37,7 @@
                              route: { cluster: email-service, timeout: { seconds: 60 } }
                          cors:
                            allow_methods: GET, PUT, DELETE, POST, OPTIONS
                            allow_headers: access-control-request-header,access-control-request-method,authorization,keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent
                            allow_headers: access-control-allow-origin,access-control-request-header,access-control-request-method,authorization,keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent
                            max_age: "1728000"
                            expose_headers: x-total-pages,x-total-count
                    http_filters:
adopt-a-pup/shelter-service/src/main/java/com/redhat/do328/adoptApup/shelterservice/ShelterController.java
@@ -3,16 +3,13 @@
import com.redhat.do328.adoptApup.shelterservice.model.Shelter;
import com.redhat.do328.adoptApup.shelterservice.service.ShelterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/shelters")
@CrossOrigin(origins = "*", exposedHeaders = "Access-Control-Allow-Origin")
public class ShelterController {
    @Autowired
adopt-a-pup/web-app/package-lock.json
@@ -4792,6 +4792,15 @@
        "buffer-indexof": "^1.0.0"
      }
    },
    "dockerfile-generator": {
      "version": "4.0.3",
      "resolved": "https://registry.npmjs.org/dockerfile-generator/-/dockerfile-generator-4.0.3.tgz",
      "integrity": "sha512-UOzfJUSLy9r66oR5sRNN8ZrJ8+QyuZ4aeUsO0MGO9KJlbUYbythjoRDhCZD5banoFcgGxrhSetLejGP5p9XUvw==",
      "requires": {
        "eslint-plugin-jsx-a11y": "^6.2.3",
        "jsonschema": "^1.2.6"
      }
    },
    "doctrine": {
      "version": "3.0.0",
      "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
@@ -8100,6 +8109,11 @@
      "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
      "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM="
    },
    "jsonschema": {
      "version": "1.2.6",
      "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.2.6.tgz",
      "integrity": "sha512-SqhURKZG07JyKKeo/ir24QnS4/BV7a6gQy93bUSe4lUdNp0QNpIz2c9elWJQ9dpc5cQYY6cvCzgRwy0MQCLyqA=="
    },
    "jsprim": {
      "version": "1.4.1",
      "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
adopt-a-pup/web-app/package.json
@@ -13,6 +13,7 @@
    "@types/react": "^16.9.0",
    "@types/react-dom": "^16.9.0",
    "axios": "^0.19.2",
    "dockerfile-generator": "^4.0.3",
    "react": "^16.13.1",
    "react-core": "0.0.0",
    "react-dom": "^16.13.1",
adopt-a-pup/web-app/src/App.tsx
@@ -31,15 +31,15 @@
let newsService: NewsService;
// Fake services for frontend-isolated developemtn
shelterService = new ShelterFakeService();
newsService = new NewsFakeService();
animalService = new AnimalFakeService();
adoptionService = new AdoptionFakeService();
// shelterService = new ShelterFakeService();
// newsService = new NewsFakeService();
// animalService = new AnimalFakeService();
// adoptionService = new AdoptionFakeService();
// Uncomment to use Real services
// adoptionService = new AdoptionRESTService(process.env.REACT_APP_ADOPTION_SERVICE_URL || "");
// animalService = new AnimalRESTService(process.env.REACT_APP_ANIMAL_SERVICE_URL || "");
// shelterService = new ShelterRESTService(process.env.REACT_APP_SHELTER_SERVICE_URL || "");
adoptionService = new AdoptionRESTService(process.env.REACT_APP_ADOPTION_SERVICE_URL || "");
animalService = new AnimalRESTService(process.env.REACT_APP_ANIMAL_SERVICE_URL || "");
shelterService = new ShelterRESTService(process.env.REACT_APP_SHELTER_SERVICE_URL || "");
// The main React component that runs the whole webapp
export default class App extends Component {