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

Allow custom mount path #106

Merged
merged 1 commit into from
Oct 16, 2023
Merged

Allow custom mount path #106

merged 1 commit into from
Oct 16, 2023

Conversation

Gao-Jun
Copy link
Contributor

@Gao-Jun Gao-Jun commented Oct 14, 2023

This PR add the ability to custom RuCaptcha's mount path with RuCaptcha.config.mount_path.

In my project, I make a sub project of a domain and mount the project at /foo, and I cannot deploy RuCaptcha to /rucaptcha.

With this PR, I can mount it at /foo/rucaptcha. And I think maybe some other projects would use this feature.

在我的一个项目中,所有的应用都被要求都部署在 /foo 下,所以我希望将 RuCaptcha 部署在 /foo/rucaptcha。目前的配置文件无法支持这个操作,所以只能通过改 HTTP Server 配置的方式处理,或者 monkey patch (还需要在engine挂载前执行),都比较复杂。所以,这个 PR 希望通过增加新的配置项 mount_path 来更加优雅地实现这个需求。

lib/rucaptcha/engine.rb Outdated Show resolved Hide resolved
with RuCaptcha.config.mount_path
@Gao-Jun
Copy link
Contributor Author

Gao-Jun commented Oct 16, 2023

PR updated.

@huacnlee huacnlee merged commit 2d64a0b into huacnlee:main Oct 16, 2023
@Gao-Jun Gao-Jun deleted the add_mount_path branch October 16, 2023 06:26
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.

None yet

2 participants