add cors to shelter-service
2 files deleted
5 files modified
| | |
| | | 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: |
| | |
| | | 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 |
| | |
| | | "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", |
| | |
| | | "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", |
| | |
| | | "@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", |
| | |
| | | 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 { |