# CORS

Cross Origin Resource Sharing, aka CORS, is a mechanism to allow access from Javascript resources in the browser to fetch resources from different domains then the Javascript is served from. By default, browsers only allow Javascript to fetch resources from the same domain.

The Valtimo Web module offers functionality to configure CORS in the application.properties file of the Valtimo Implementation project. The following example shows the used parameters with specific domain names for the origin and wildcards for the allowed methods and headers:

```yaml
valtimo:
  web:
    cors:
      corsConfiguration:
        allowedOrigins:
          - http://localhost:8000
          - https://example.valtimowebsites.net
        allowedMethods:
          - "*"
        allowedHeaders:
          - "*"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.valtimo.nl/v12/fundamentals/getting-started/modules/core/web/valtimo-cors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
