Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable cors in localosmosis by default #4879

Closed
p0mvn opened this issue Apr 10, 2023 · 0 comments · Fixed by #4891
Closed

chore: enable cors in localosmosis by default #4879

p0mvn opened this issue Apr 10, 2023 · 0 comments · Fixed by #4891
Assignees

Comments

@p0mvn
Copy link
Member

p0mvn commented Apr 10, 2023

Background

image

Set allowed origins to star in config.toml via bash script

Acceptance Criteria

  • cors is enabled by default
  • manually tested
@niccoloraspa niccoloraspa self-assigned this Apr 10, 2023
mergify bot pushed a commit that referenced this issue Apr 11, 2023
Closes: [#4879](#4879)

## What is the purpose of the change

Enables cors on localOsmosis for:
- rpc
- api
- gRPC-web

## Brief Changelog

- Enable cors by default on localosmosis

## Testing and Verifying

Start localosmosis:

```bash
make localnet-start
```

Check file changes:

```bash
❯ cat ~/.osmosisd-local/config/config.toml | grep cors
  cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", "Accept-Encoding"]
  cors_allowed_methods = ["HEAD", "GET", "POST", "DELETE", "OPTIONS", "PATCH", "PUT"]
  cors_allowed_origins = ["*"]
```

```bash
❯ cat ~/.osmosisd-local/config/app.toml | grep cors
  enabled-unsafe-cors = true
  enable-unsafe-cors = true
```

## Documentation and Release Note

  - Does this pull request introduce a new feature or user-facing behavior changes? no
  - Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`? yes
  - How is the feature or change documented? not applicable
@mergify mergify bot closed this as completed in #4891 Apr 11, 2023
mergify bot pushed a commit that referenced this issue Apr 11, 2023
Closes: [#4879](#4879)

## What is the purpose of the change

Enables cors on localOsmosis for:
- rpc
- api
- gRPC-web

## Brief Changelog

- Enable cors by default on localosmosis

## Testing and Verifying

Start localosmosis:

```bash
make localnet-start
```

Check file changes:

```bash
❯ cat ~/.osmosisd-local/config/config.toml | grep cors
  cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", "Accept-Encoding"]
  cors_allowed_methods = ["HEAD", "GET", "POST", "DELETE", "OPTIONS", "PATCH", "PUT"]
  cors_allowed_origins = ["*"]
```

```bash
❯ cat ~/.osmosisd-local/config/app.toml | grep cors
  enabled-unsafe-cors = true
  enable-unsafe-cors = true
```

## Documentation and Release Note

  - Does this pull request introduce a new feature or user-facing behavior changes? no
  - Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`? yes
  - How is the feature or change documented? not applicable

(cherry picked from commit 3b2e168)

# Conflicts:
#	CHANGELOG.md
#	tests/localosmosis/scripts/setup.sh
niccoloraspa added a commit that referenced this issue Apr 12, 2023
* Enable CORS on localosmosis (#4891)

Closes: [#4879](#4879)

## What is the purpose of the change

Enables cors on localOsmosis for:
- rpc
- api
- gRPC-web

## Brief Changelog

- Enable cors by default on localosmosis

## Testing and Verifying

Start localosmosis:

```bash
make localnet-start
```

Check file changes:

```bash
❯ cat ~/.osmosisd-local/config/config.toml | grep cors
  cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", "Accept-Encoding"]
  cors_allowed_methods = ["HEAD", "GET", "POST", "DELETE", "OPTIONS", "PATCH", "PUT"]
  cors_allowed_origins = ["*"]
```

```bash
❯ cat ~/.osmosisd-local/config/app.toml | grep cors
  enabled-unsafe-cors = true
  enable-unsafe-cors = true
```

## Documentation and Release Note

  - Does this pull request introduce a new feature or user-facing behavior changes? no
  - Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`? yes
  - How is the feature or change documented? not applicable

(cherry picked from commit 3b2e168)

# Conflicts:
#	CHANGELOG.md
#	tests/localosmosis/scripts/setup.sh

* Update CHANGELOG.md

* Align setup.sh

* Update create_two_asset_pool()

---------

Co-authored-by: Niccolo Raspa <[email protected]>
Co-authored-by: Niccolo Raspa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants