Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@iku000888
Copy link

There are libs(e.g. https://github.com/r0man/ring-cors) that require regex patterns to be passed in, and it would be great if I can specify e.g. #"some-allowed-origin" directly in the config edn file.
This however did not work because it is not part of the eden spec.

This PR is the next thing I tried in my project and was pretty happy about it. Would it make sense to have this in duct/core?

Copy link
Contributor

@weavejester weavejester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable, but I'll need to think about it.

You know that custom reader tags can be specified, right?

'duct/include (make-include readers)
'duct/resource resource}
'duct/resource resource
'duct/regex #(Pattern/compile %)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be changed to re-compile?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean re-pattern?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep!

@iku000888 iku000888 force-pushed the feature/regex-reader-tag branch from fd56e7f to dab4953 Compare March 29, 2019 00:35
@iku000888
Copy link
Author

You know that custom reader tags can be specified, right?

Yes and that is what I do right now and works great & happy with that, so it is totally up to you ;)

@iku000888 iku000888 force-pushed the feature/regex-reader-tag branch from dab4953 to 6ccb1ac Compare March 29, 2019 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants